Commit Graph

16559 Commits

Author SHA1 Message Date
reed
7eeba25877 Notify resource caches when pixelref genID goes stale
patch from issue 954443002 at patchset 40001 (http://crrev.com/954443002#ps40001)

BUG=skia:

Review URL: https://codereview.chromium.org/950363002
2015-02-24 13:54:23 -08:00
joshualitt
4b583ac54b FreeType uses unsigned int, Skia uses int.
Fix warning about assert which compared signed and unsigned.

Review URL: https://codereview.chromium.org/956623004
2015-02-24 13:43:00 -08:00
joshualitt
6065b88d1c fix for msan
BUG=skia:

Review URL: https://codereview.chromium.org/958433004
2015-02-24 13:20:59 -08:00
fmalita
4739955e98 Use an image generator to back SkPictureShader tiles.
To avoid lifetime issues for tiles backed by discardable memory, use an
image generator to re-generate them on the fly.

With this CL, we are now caching bitmap shaders wrapping discardable
pixel ref bitmaps backed by picture image generators.

(the CL also includes some minor/unrelated SkPictureShader cleanup)

BUG=skia:3220
R=reed@google.com,halcanary@google.com

Review URL: https://codereview.chromium.org/866773002
2015-02-24 13:02:57 -08:00
joshualitt
5b27b142f2 don't draw if maxVertices returns 0 or > than uin16_t max
This doesn't do anything about the issue of having too many indices, but it does move the fuzzer on to another assert.

BUG=skia:

Review URL: https://codereview.chromium.org/952993004
2015-02-24 12:58:46 -08:00
halcanary
334fcbc167 SkPDF: replace SkPDFDevice::copyContentToData
Motivation: remove copyToData().  Later we will stop caching
the data alltogether.

BUG=skia:

Review URL: https://codereview.chromium.org/958433003
2015-02-24 12:56:16 -08:00
mtklein
f73e589c0d Add tools/nanobench_flags.py.
This should look suspiciously similar to tools/dm_flags.py.  In fact, I
tweaked tools/dm_flags.py a bit to make it even more suspiciously similar.
I'll leave actually deduping this to future me.

I noticed we have an opportunity to make our Valgrind run of nanobench faster,
by not only making it not auto-calibrate (--loops 1) but also take only one
measurement (--samples 1).  Should be 5-10x faster than the default.

BUG=skia:

Review URL: https://codereview.chromium.org/957503002
2015-02-24 11:45:11 -08:00
robertphillips
fe1b180bee Fix radii scaling bug in SkRRect::setNinePatch
BUG=skia:3466

Review URL: https://codereview.chromium.org/951323004
2015-02-24 11:18:48 -08:00
Mike Klein
1a2979af08 fix nvpr
The config is called nvprmsaa4 (see DM.cpp:218)

BUG=skia:

Review URL: https://codereview.chromium.org/953743007
2015-02-24 13:16:43 -05:00
mtklein
11a2c503bd add tools/dm_flags.py
BUG=skia:

Review URL: https://codereview.chromium.org/950903003
2015-02-24 09:25:16 -08:00
halcanary
a1cb378a82 GM: showmiplevels handles bitmap memory in a nicer way.
This is helpful for those canvas implementations that want to copy a
bitmap.

Review URL: https://codereview.chromium.org/935943007
2015-02-24 09:25:09 -08:00
joshualitt
233c6ce41f k1 fix
TBR=
NOTREECHECKS=True
BUG=skia:

Review URL: https://codereview.chromium.org/952973002
2015-02-24 08:17:49 -08:00
joshualitt
ab2f44cbfa probable fix for asan bot
NOTREECHECKS=True
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/956583002
2015-02-24 06:47:14 -08:00
scroggo
e59bbf1cd5 Revert of Make fID and MixedID calculations private (patchset #5 id:80001 of https://codereview.chromium.org/939123002/)
Reason for revert:
This actually *does* change the public API - fID is now private, and it was being used on Android. See 5242b865d3/logs/build.log :

In file included from frameworks/base/libs/hwui/tests/../font/Font.cpp:26:0:
external/skia/src/core/SkGlyph.h: In member function 'android::uirenderer::CachedGlyphInfo* android::uirenderer::Font::cacheGlyph(const SkPaint*, glyph_t, bool)':
external/skia/src/core/SkGlyph.h:157:17: error: 'uint32_t SkGlyph::fID' is private
     uint32_t    fID;
                 ^
frameworks/base/libs/hwui/tests/../font/Font.cpp:482:39: error: within this context
     newGlyph->mGlyphIndex = skiaGlyph.fID;

We need to update Android in order to hide fID.

Original issue's description:
> BUG=skia:
>
> (mtklein from here on)
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15

TBR=mtklein@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/951353002
2015-02-24 06:09:41 -08:00
caryclark
1297ecfd1d flip stroke to chrome compatible define
Review URL: https://codereview.chromium.org/932723003
2015-02-24 06:02:06 -08:00
herb
f8d24e2c0c BUG=skia:
(mtklein from here on)
No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/939123002
2015-02-24 05:12:05 -08:00
kkinnunen
73953e7d00 Make SkNewImageFromBitmap take pixel ref origin into account
Make SkNewImageFromBitmap take pixel ref origin into account.

BUG=skia:3388

Review URL: https://codereview.chromium.org/951483002
2015-02-23 22:12:12 -08:00
joshualitt
0413d43e1b Enable rect clips
BUG=skia:

Review URL: https://codereview.chromium.org/951653002
2015-02-23 17:52:51 -08:00
joshualitt
9ece6a9548 move static init to cpp file to fix linux builder
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/947933004
2015-02-23 17:03:33 -08:00
joshualitt
58773334d7 non-aa rects batch
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/ee72dde696b35534465c14f6b4c5bfca44a2f63e

Review URL: https://codereview.chromium.org/931293002
2015-02-23 16:41:42 -08:00
joshualitt
128def3900 Revert of fix for linux builder warn on exit destructor (patchset #1 id:1 of https://codereview.chromium.org/951103002/)
Reason for revert:
still breaks

Original issue's description:
> fix for linux builder warn on exit destructor
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/51fdb4f8f63b6bb13e719000381e225503a2d4a0

TBR=joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/955493003
2015-02-23 16:19:22 -08:00
bungeman
994e818efe Provide Mac 10.6 SDK support for kCTFontColorGlyphsTrait.
kCTFontColorGlyphsTrait was introduced in Mac 10.7 and iPhone 4.3 SDKs.
Chromium still builds with the 10.6 SDK, so provide this constant when
it is otherwise unavailable.

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/951723003
2015-02-23 16:17:43 -08:00
joshualitt
51fdb4f8f6 fix for linux builder warn on exit destructor
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/951103002
2015-02-23 15:57:23 -08:00
joshualitt
44701df5ce Move clip off of draw target
BUG=skia:

Review URL: https://codereview.chromium.org/947443003
2015-02-23 14:44:58 -08:00
bungeman
98c251bc7e Use traits instead of table for color glyph detection.
The CTFont already knows if a font might contain color glyphs,
so use that information directly instead of guessing ourselves.

Review URL: https://codereview.chromium.org/949933003
2015-02-23 14:24:04 -08:00
jvanverth
9671ecd44e Use highp for distance field texture coord varyings.
Because the glyph texture atlas is 1024x2048, on certain platforms
using mediump UVs is not enough resolution for doing texture lookups
and getting good results for distance fields. Bumping these
to highp solves this problem.

BUG=skia:3445

Review URL: https://codereview.chromium.org/951003002
2015-02-23 13:08:39 -08:00
caryclark
6df8e3495a break out of cubic stroker loop on degenerate case
The looper can generate more than one quad, but if any one is degenerate,
give up, but not before generating the state for the line join to
produce the correct end.

Before, the early return allowed the inside path to contain multiple
movetos that caused reversePath to assert.

R=reed@google.com

Review URL: https://codereview.chromium.org/948043002
2015-02-23 12:47:03 -08:00
djsollen
f056bd1e01 Ensure that skia's test resources are properly packaged on Android
Review URL: https://codereview.chromium.org/949853003
2015-02-23 12:37:32 -08:00
tomhudson
eebc39ad5a Add HWUI Sink to DM on Android Framework builds
Allows "hwui" as a --config argument to dm, drawing through the Android
Framework's HWUI backend.

R=djsollen@google.com,mtklein@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/943393002
2015-02-23 12:18:05 -08:00
halcanary
7af21501a6 SkStream: Add SkDynamicMemoryWStream::writeToStream(SkWStream*)
Review URL: https://codereview.chromium.org/943423002
2015-02-23 12:18:00 -08:00
bsalomon
52057c8707 Fix release-developer build.
TBR=humper@google.com

Review URL: https://codereview.chromium.org/951613002
2015-02-23 12:12:59 -08:00
egdaniel
0bdeec9640 Remove canApplyCoverage from XP and all related functions in gpu code.
BUG=skia:

Review URL: https://codereview.chromium.org/919683002
2015-02-23 12:12:54 -08:00
robertphillips
b8de1f4659 Reset conicWeights in SkPath::consumeDegenerateSegments when rewinding to last Move op
Without this patch the iterator can end up running off the end of the conic weights if there is a mixture of degenerate and non-degenerate ops

Note: we might want to suppress the generation of degenerate conics and lines in SkPath::addRRect

BUG=459897

Review URL: https://codereview.chromium.org/954453003
2015-02-23 11:17:01 -08:00
bsalomon
1a9600f253 Make STDPQueue::at() available in all builds.
Review URL: https://codereview.chromium.org/955433003
2015-02-23 10:59:50 -08:00
vmiura
278f86e4df SkDiscardablePixelRef should favor not decoding to YUV if they already decoded to RGB.
BUG=skia:
BUG=459760

Review URL: https://codereview.chromium.org/944823004
2015-02-23 10:59:44 -08:00
bsalomon
93276c683d Remove EGL header from SkANGLELContext.h
TBR=egdaniel@google.com

Review URL: https://codereview.chromium.org/947263002
2015-02-23 10:51:13 -08:00
halcanary
44906c6628 Revert of DM: lazy decoding on SKP playback (patchset #4 id:60001 of https://codereview.chromium.org/943383002/)
Reason for revert:
crashing dm

Test-Mac10.9-MacMini6.2-HD4000-x86_64-Debug

u gm addarc
(1431MB   932) 169ms	gpu gm aarectmodes
(1431MB   931) 38.6ms	gpu gm aaclip
(1431MB   930) 474ms	gpu skp desk_amazon.skp
(1431MB   929) 615ms	gpu skp desk_baidu.skp
(1431MB   928) 600ms	gpu skp desk_blogger.skp
Signal 11:
_sigtramp (+0x1a)
compute_yuv_size(jpeg_decompress_struct const&, int, SizeType) (+0x30)
update_components_sizes(jpeg_decompress_struct const&, SkTSize<int>*, SizeType) (+0x46)
SkJPEGImageDecoder::onDecodeYUV8Planes(SkStream*, SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x239)
SkImageDecoder::decodeYUV8Planes(SkStream*, SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x64)
SkImageDecoderGenerator::onGetYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x9f)
SkImageGenerator::getYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x3b7)
SkDiscardablePixelRef::onGetYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x3c)
SkPixelRef::getYUV8Planes(SkTSize<int>*, void**, unsigned long*, SkYUVColorSpace*) (+0x55)
load_yuv_texture(GrContext*, GrUniqueKey const&, SkBitmap const&, GrSurfaceDesc const&) (+0x24b)
create_unstretched_bitmap_texture(GrContext*, SkBitmap const&, GrUniqueKey const&) (+0x3df)
create_bitmap_texture(GrContext*, SkBitmap const&, Stretch, GrUniqueKey const&, GrUniqueKey const&) (+0x1ca)
GrRefCachedBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*) (+0x368)
AutoBitmapTexture::set(GrContext*, SkBitmap const&, GrTextureParams const*) (+0x87)
AutoBitmapTexture::AutoBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*, GrTexture**) (+0xe0)
AutoBitmapTexture::AutoBitmapTexture(GrContext*, SkBitmap const&, GrTextureParams const*, GrTexture**) (+0x35)
SkGpuDevice::internalDrawBitmap(SkBitmap const&, SkMatrix const&, SkRect const&, GrTextureParams const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags, bool, bool) (+0x118)
SkGpuDevice::drawBitmapCommon(SkDraw const&, SkBitmap const&, SkRect const*, SkSize const*, SkPaint const&, SkCanvas::DrawBitmapRectFlags) (+0xa84)
SkGpuDevice::drawBitmapRect(SkDraw const&, SkBitmap const&, SkRect const*, SkRect const&, SkPaint const&, SkCanvas::DrawBitmapRectFlags) (+0x2bb)
SkCanvas::internalDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x2a9)
SkCanvas::onDrawBitmapRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x118)
SkCanvas::drawBitmapRectToRect(SkBitmap const&, SkRect const*, SkRect const&, SkPaint const*, SkCanvas::DrawBitmapRectFlags) (+0x60)
void SkRecords::Draw::draw<SkRecords::DrawBitmapRectToRect>(SkRecords::DrawBitmapRectToRect const&) (+0x8a)
void SkRecords::Draw::operator()<SkRecords::DrawBitmapRectToRect>(SkRecords::DrawBitmapRectToRect const&) (+0x1d)
void SkRecord::Record::visit<void, SkRecords::Draw>(SkRecord::Type8, SkRecords::Draw&) const (+0x298)
void SkRecord::visit<void, SkRecords::Draw>(unsigned int, SkRecords::Draw&) const (+0xbc)
SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) (+0x2eb)
SkPicture::playback(SkCanvas*, SkPicture::AbortCallback*) const (+0x186)
SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) (+0xe0)
SkCanvas::drawPicture(SkPicture const*) (+0x11b)
DM::SKPSrc::draw(SkCanvas*) const (+0x25b)
DM::GPUSink::draw(DM::Src const&, SkBitmap*, SkWStream*, SkString*) const (+0x21d)
Task::Run(Task*) (+0x1de)
run_enclave(SkTArray<Task, false>*) (+0x49)
run_enclave_and_gpu_tests(SkTArray<Task, false>*) (+0x15)
(anonymous namespace)::ThreadPool::Wait(int*) (+0x14b)
SkTaskGroup::wait() (+0x15)
dm_main() (+0x624)
main (+0x27)

Original issue's description:
> DM: lazy decoding on SKP playback
>
> Command `out/Release/dm --config pdf --src gm skp`, uses 27% less RAM.
>
> Committed: https://skia.googlesource.com/skia/+/77d366d72a6ae83fb0abcb2ec7e2d692fef2e923

TBR=mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/947103005
2015-02-23 10:43:48 -08:00
halcanary
77d366d72a DM: lazy decoding on SKP playback
Command `out/Release/dm --config pdf --src gm skp`, uses 27% less RAM.

Review URL: https://codereview.chromium.org/943383002
2015-02-23 10:28:03 -08:00
bsalomon
c01f47b759 Remove unnecessary include of gles2 header in SkANGLEGLContext.h
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/949973002
2015-02-23 10:06:44 -08:00
mtklein
a2f4be76a9 Sketch SkPMFloat
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon-Trybot

http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

Review URL: https://codereview.chromium.org/936633002
2015-02-23 10:04:34 -08:00
bungeman
9c007f23c1 Use #if instead of #ifdef with SK_HAS_DWRITE_X.
Review URL: https://codereview.chromium.org/943233004
2015-02-23 13:02:49 -05:00
bsalomon
9e5fc72d63 Add stencil buffer create tracking to GPU stats.
Review URL: https://codereview.chromium.org/949953002
2015-02-23 10:01:36 -08:00
mtklein
088302756b Revert of Sketch SkPMFloat (patchset #15 id:270001 of https://codereview.chromium.org/936633002/)
Reason for revert:
http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu13.10-GCC4.8-Arm7-Release-Android_Neon/builds/2120/steps/build%20most/logs/stdio

Original issue's description:
> Sketch SkPMFloat
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/50d2b3114b3e59dc84811881591bf25b2c1ecb9f

TBR=reed@google.com,msarrett@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/952453004
2015-02-23 09:44:34 -08:00
bungeman
28512f7f54 Use IDWriteFontFallback when available.
This is prefereable to the current IDWriteTextLayout method,
but is only available on Windows 8.1 and later.

Review URL: https://codereview.chromium.org/942083004
2015-02-23 09:41:43 -08:00
mtklein
50d2b3114b Sketch SkPMFloat
BUG=skia:

Review URL: https://codereview.chromium.org/936633002
2015-02-23 09:39:27 -08:00
bsalomon
2596567793 Don't require AA in order to use shader-based clips
Review URL: https://codereview.chromium.org/941423002
2015-02-23 09:28:30 -08:00
bsalomon
dd3143b007 clear stencil buffer using special purpose FBO
Review URL: https://codereview.chromium.org/941383003
2015-02-23 09:27:45 -08:00
bsalomon
6bc1b5fab8 Dynamically create stencil buffer when needed.
Review URL: https://codereview.chromium.org/938383004
2015-02-23 09:06:38 -08:00
bsalomon
42380174ca Use D3D11 backend for ANGLE when available.
Review URL: https://codereview.chromium.org/954453002
2015-02-23 08:57:23 -08:00
joshualitt
332c729cec Default path renderer batch
BUG=skia:

Review URL: https://codereview.chromium.org/884013010
2015-02-23 08:44:31 -08:00