aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Revert of Avoid CTFontCreateCopyWithAttributes. (patchset #4 id:60001 of ↵Gravatar bungeman2015-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1344213004/ ) Reason for revert: Causes issues with synthetic bold italic on all versions of OSX, with OSX10.10 resulting in many measurement related changes (this is expected though). fast/text/atsui-multiple-renderers.html fast/css/font-face-synthetic-bold-italic.html https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_9__retina_/6168/layout-test-results/results.html https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_10/4525/layout-test-results/results.html Original issue's description: > Avoid CTFontCreateCopyWithAttributes. > > It appears that CTFontCreateCopyWithAttributes and > CTFontCreateCopyWithSymbolicTraits share similar issues with the default > font on OSX10.10. CTFontCreateWithFontDescriptor cannot be used as > it will not work with webfonts. Since this is all low-level use, create the > CTFonts from the underlying CGFonts directly. > > BUG=chromium:524646 > > Committed: https://skia.googlesource.com/skia/+/d3296717b9d0930237be3502b82ab94d0b4d177f TBR=erikchen@chromium.org,mtklein@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:524646 Review URL: https://codereview.chromium.org/1354323002
* Avoid CTFontCreateCopyWithAttributes.Gravatar bungeman2015-09-18
| | | | | | | | | | | | It appears that CTFontCreateCopyWithAttributes and CTFontCreateCopyWithSymbolicTraits share similar issues with the default font on OSX10.10. CTFontCreateWithFontDescriptor cannot be used as it will not work with webfonts. Since this is all low-level use, create the CTFonts from the underlying CGFonts directly. BUG=chromium:524646 Review URL: https://codereview.chromium.org/1344213004
* Create append methods in batch namespacesGravatar joshualitt2015-09-18
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1353553002
* Fix for combining with perspective local rectsGravatar joshualitt2015-09-18
| | | | | | | TBR=robertphillips@google.com BUG=skia: Review URL: https://codereview.chromium.org/1347913004
* Disable dithering in libjpeg-turbo for 565 decodesGravatar msarett2015-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libjpeg-turbo turns on dithering by default. When we decode to RGBA, it uses Floyd-Steinberg dithering - consistent with the libjpeg6b gold standard, When we decode to 565, it uses ordered dithering. Ordered dithering for 565 is not part of the 6b standard (libjpeg6b doesn't even support 565) and is causing us a number of issues: (1) Ordered dithering + nearest neighbor sampling is causing checkerboard visual artifacts in some outputs. (2) The ordered dither function in libjpeg-turbo actually behaves differently depending on the alignment of the memory that it decodes into. This means that two image decodes that should be identical may look different just because they decode into different memory blocks. This was causing some diffs on Gold with the scanline_subset test that were causing me some confusion. (3) Maybe not the best evidence, but visually I can't tell a difference with and without dithering (except when nearest neighbor scaling causes the checkerboard artifact). (4) Turning off dithering should be a more significant performance improvement than you might expect. libjpeg-turbo has SIMD color conversions to 565, but when dithering is on, it defaults to scalar code. This CL should make every jpeg decode to 565 on Gold look slightly different. Yay! BUG=skia: Review URL: https://codereview.chromium.org/1349563007
* Use rounding when converting desiredScale to a sampleSizeGravatar msarett2015-09-18
| | | | | | | | | | | | | | | | | | | | | Right now we have a bug in Gold where some images are labeled _0.167 and others are labeled _0.166. They are all 1/6 scales and should be labeled the same way and compared. The fix involves changing 0.166 to 0.167 in the list of scales that we test on, but SkScaledCodec does not scale to 0.167 as I expected. SkScaledCodec converts 0.167 to sampleSize = 5.999 and then casts to sampleSize = 5. I would argue that we should do a true round, so 0.167 represents a sampleSize of 6. In general, this CL change onGetScaledDimensions so that we now round desiredScale to the nearest sampleSize. BUG=skia: Review URL: https://codereview.chromium.org/1356923002
* Revert of add ImageShader, sharing code with its Bitmap cousin (patchset #10 ↵Gravatar tomhudson2015-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:180001 of https://codereview.chromium.org/1342113002/ ) Reason for revert: Failing ImageNewShaderTest on both Android (Tegra3 GPU) and iOS bots. e.g. /Users/chrome-bot/buildbot/skiabot-ipad4-000/build/slave/workdir/build/skia/tests/ ImageNewShaderTest.cpp:24 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.getSize()) ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y) ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y) ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y) ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y) ImageNewShaderTest.cpp:98 0xFFDEDEDE == bmt.getColor(x, y) ImageNewShaderTest.cpp:95 0xFFFF0000 == bmt.getColor(0, y) ... Original issue's description: > add ImageShader, sharing code with its Bitmap cousin > > This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers. > > It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/0b93e3149d2cb30860c51f9f3204ae811d9a97ca TBR=fmalita@chromium.org,bsalomon@google.com,robertphillips@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1355863002
* add ImageShader, sharing code with its Bitmap cousinGravatar reed2015-09-18
| | | | | | | | | | This is done by having abstracted the BitmapShaderContext to take a BitmapProvider, instead of just a bitmap. This allows us to share all of that code between SkBitmap and SkImage, since both are valid providers. It also means that we can simplify SkImage_Base to not need a virtual for onNewShader, since ALL images can uniformly be turned into a shader now. BUG=skia: Review URL: https://codereview.chromium.org/1342113002
* Purge cached resources on SkImage destruction.Gravatar fmalita2015-09-18
| | | | | | | BUG=532981 R=reed@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1352883004
* Move StrokeRectBatches into .cpp filesGravatar joshualitt2015-09-18
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1353683003
* Add debug mode to shared mutex.Gravatar herb2015-09-18
| | | | Review URL: https://codereview.chromium.org/1307863009
* Merge sub-device annotations in SkPDFDevice::drawDevice()Gravatar wangxianzhu2015-09-17
| | | | | | | | | | | | | | | | | | Previously annotations added between saveLayer/restore were lost. Merge annotations in SkPDFDevice::drawDevice(). Also modified code to apply correct transformation and clipping on annotations added between saveLayer/restore: - Apply the initial transform only when adding the annotations into the doc, otherwise we need to unapply sub-device's initial transform before merging the annotations into parent-device. - Apply only device-local clipping. fClipStack is in global coordinates, which is not suitable to clip rects in sub-devices. BUG=skia:4080 BUG=503515 Review URL: https://codereview.chromium.org/1257533004
* Reland of add a ClassID function to GrBatch (patchset #1 id:1 of ↵Gravatar reed2015-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1353043002/ ) Reason for revert: DEPS roll seems to have landed w/o this revert, so revert it again Original issue's description: > Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ ) > > Reason for revert: > Speculative revert to unblock DEPS roll > > Original issue's description: > > add a ClassID function to GrBatch > > > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9 > > > > Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343 > > TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/48e3a45ade15c52c0c1a10cb00907dd444897745 TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1344373005
* Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of ↵Gravatar reed2015-09-17
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1352813003/ ) Reason for revert: Speculative revert to unblock DEPS roll Original issue's description: > add a ClassID function to GrBatch > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9 > > Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343 TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1353043002
* share IDs between cacherator and its host-imageGravatar reed2015-09-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1357543002
* use allocator (if present) when we allocate our cache bitmapGravatar reed2015-09-17
| | | | | | | | Remove some bogus tests on the cache, as they are not thread-reliable. Running w/ discardable these are racy. BUG=532981 Review URL: https://codereview.chromium.org/1351453004
* add a ClassID function to GrBatchGravatar joshualitt2015-09-17
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9 Review URL: https://codereview.chromium.org/1352813003
* Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of ↵Gravatar joshualitt2015-09-17
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1352813003/ ) Reason for revert: breaks mac bot Original issue's description: > add a ClassID function to GrBatch > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9 TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1345393003
* add a ClassID function to GrBatchGravatar joshualitt2015-09-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1352813003
* Fix Ganesh perspective projection bugGravatar robertphillips2015-09-17
| | | | | | BUG=skia:3326 Review URL: https://codereview.chromium.org/1352883002
* have raster-image return itself as a textureGravatar reed2015-09-16
| | | | | | | | This tickles skbug.com/4351, but we don't know how to fix that yet, so we think this CL is ok. BUG=skia: Review URL: https://codereview.chromium.org/1348023004
* share code between SkGr and CacheratorGravatar reed2015-09-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1351533004
* minor cleanupGravatar joshualitt2015-09-16
| | | | | | | TBR= BUG=skia: Review URL: https://codereview.chromium.org/1348773003
* Use atomic subtract in shared mutex.Gravatar herb2015-09-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1348173003
* Create fragment processor for performing input color blend with child processorGravatar bsalomon2015-09-15
| | | | | | The new FP is used to implement SkXM::Mode color filters and SkXM::Mode image filters. Also, these now support all advanced SkXM::Mode xfermodes. Review URL: https://codereview.chromium.org/1334293003
* Revert of Parallel cache - preliminary (patchset #24 id:460001 of ↵Gravatar herb2015-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Reason for revert: Breaks DrMemory in the chrome roll. Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330,528560 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f > > Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec > > Committed: https://skia.googlesource.com/skia/+/014ffdb01ea5317614a1569efc30c50f06434222 TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1330,528560 Review URL: https://codereview.chromium.org/1345903002
* move SkBitmapProvider to its own fileGravatar reed2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1346713002
* Fix vs2015 buildGravatar bsalomon2015-09-15
| | | | | | TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/1344203002
* Add onMemoryDump to GrContextGravatar ericrk2015-09-15
| | | | | | | | | | | | | Adds an entry point to GrContext to allow enumeration and tracing of GPU resources via the newly added SkTraceMemoryDump. Plan is for Chrome to call this on each of its GrContexts. Dumps both the total size of GPU resources, as well as the total purgeable size. BUG=526261 Review URL: https://codereview.chromium.org/1313743002
* fix up GrGLProgrambuilder precision on varyingsGravatar joshualitt2015-09-15
| | | | | | | TBR= BUG=skia:4347 Review URL: https://codereview.chromium.org/1344943002
* use SkBitmapProvider for shader-contextGravatar reed2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1343123005
* On gpu, use max(r,g,b) for coverage alpha in LCD and update lcd blend gm.Gravatar egdaniel2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1339213004
* Update params to get better packing for DF path atlasGravatar jvanverth2015-09-15
| | | | | | Gets about a 4x speedup on desk_chalkboard.skp. Review URL: https://codereview.chromium.org/1345823002
* Forward declare SkStrokeRec in SkPathEffectGravatar halcanary2015-09-15
| | | | Review URL: https://codereview.chromium.org/1312163008
* create SkBitmapProvider to abstract images and bitmapsGravatar reed2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1340223003
* Add special case circle blur for GaneshGravatar robertphillips2015-09-15
| | | | | | | | This makes the blurcircles bench go from ~33us to ~8us on Windows desktop. It will require layout test suppressions Review URL: https://codereview.chromium.org/1311583005
* Add support for blending of LCD for all blend modes.Gravatar egdaniel2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1313623002
* Minor fix to attaching stencilsGravatar egdaniel2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1344033002
* Parallel cache.Gravatar herb2015-09-15
| | | | | | | | | | | | TBR=reed@google.com BUG=skia:1330,528560 Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec Review URL: https://codereview.chromium.org/1264103003
* remove code from SK_SUPPORT_LEGACY_NEWFROMGENERATOR, eliminates caller of ↵Gravatar reed2015-09-14
| | | | | | | | deprecated SkInstallDiscardablePixelRef BUG=skia: Review URL: https://codereview.chromium.org/1344663002
* SkImageSourceGravatar fmalita2015-09-14
| | | | | | | | | | | | | Blink is migrating away from SkBitmaps, so we need an SkImage-based SkImageFilter source. This is pretty much a 1-1 equivalent of SkBitmapSource. To avoid duplication, relocate the SkImage deserialization logic from SkPictureData to SkReadBuffer. R=reed@google.com,robertphillips@google.com,senorblanco@chromium.org Review URL: https://codereview.chromium.org/1343703005
* Add helper for creating leaf FPs inside GrFP::TestCreate functionsGravatar bsalomon2015-09-14
| | | | Review URL: https://codereview.chromium.org/1334273003
* Revert of SkPx: new approach to fixed-point SIMD (patchset #9 id:160001 of ↵Gravatar mtklein2015-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1317233005/ ) Reason for revert: http://build.chromium.org/p/client.skia.compile/builders/Build-Mac10.8-Clang-Arm7-Debug-Android/builds/4627 Original issue's description: > SkPx: new approach to fixed-point SIMD > > SkPx is like Sk4px, except each platform implementation of SkPx can declare > a different sweet spot of N pixels, with extra loads and stores to handle the > ragged edge of 0<n<N pixels. > > In this case, _sse's sweet spot remains 4 pixels. _neon jumps up to 8 so > we can now use NEON's transposing loads and stores, and _none is just 1. > This makes operations involving alpha considerably more efficient on NEON, > as alpha is its own distinct 8x8 bit plane that's easy to toss around. > > This incorporates a few other improvements I've been wanting: > - no requirement that we're dealing with SkPMColor. SkColor works too. > - no anonymous namespace hack to differentiate implementations. > > Codegen and perf look good on Clang/x86-64 and GCC/ARMv7. > The NEON code looks very similar to the old NEON code, as intended. > No .skp or GM diffs on my laptop. Don't expect any. > > I intend this to replace Sk4px. Plan after landing: > - port SkXfermode_opts.h > - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other > SkOpts code) > - delete all Sk4px-related code > - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.) > leaving Sk2f, Sk4f (and Sk2s, Sk4s). > - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels > at a time. > > In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels. > > BUG=skia:4117 > > Committed: https://skia.googlesource.com/skia/+/82c93b45ed6ac0b628adb8375389c202d1f586f9 TBR=mtklein@google.com,msarett@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4117 Review URL: https://codereview.chromium.org/1336423002
* Move some of the adding stencil attachment logic of Gpu and into Render Target.Gravatar egdaniel2015-09-14
| | | | | | | | | | | | | | The new flow of calls for attaching a Stencil looks like: Client rt->attachStencilAttachment() gpu->getStencilAttachment() glgpu->createStencilAttachment() glrt->completeStencilAttachment() //actually attaches BUG=skia: Review URL: https://codereview.chromium.org/1333383002
* Update SkWhitelistChecksums.cpp with the checksums of the fonts on the CT ↵Gravatar rmistry2015-09-14
| | | | | | | | | | | | slave machines. This file was generated using the whitelist_typefaces tool. I tried out this file on 3 of the 100 CT slaves and './out/Debug/whitelist_typefaces --check' successfully returned 0. BUG=skia:4336 Review URL: https://codereview.chromium.org/1344553004
* SkPx: new approach to fixed-point SIMDGravatar mtklein2015-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkPx is like Sk4px, except each platform implementation of SkPx can declare a different sweet spot of N pixels, with extra loads and stores to handle the ragged edge of 0<n<N pixels. In this case, _sse's sweet spot remains 4 pixels. _neon jumps up to 8 so we can now use NEON's transposing loads and stores, and _none is just 1. This makes operations involving alpha considerably more efficient on NEON, as alpha is its own distinct 8x8 bit plane that's easy to toss around. This incorporates a few other improvements I've been wanting: - no requirement that we're dealing with SkPMColor. SkColor works too. - no anonymous namespace hack to differentiate implementations. Codegen and perf look good on Clang/x86-64 and GCC/ARMv7. The NEON code looks very similar to the old NEON code, as intended. No .skp or GM diffs on my laptop. Don't expect any. I intend this to replace Sk4px. Plan after landing: - port SkXfermode_opts.h - port Color32 in SkBlitRow_D32.cpp (and move to SkBlitRow_opts.h like other SkOpts code) - delete all Sk4px-related code - clean up evolutionary dead ends in SkNx (Sk16b, Sk16h, Sk4i, Sk4d, etc.) leaving Sk2f, Sk4f (and Sk2s, Sk4s). - find a machine with AVX2 to work on, write SkPx_avx2.h handling 8 pixels at a time. In the end we'll have Sk4f for float pixels, SkPx for fixed-point pixels. BUG=skia:4117 Review URL: https://codereview.chromium.org/1317233005
* Test that GrFragmentProcessors work without input colors.Gravatar bsalomon2015-09-14
| | | | | | Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751 Review URL: https://codereview.chromium.org/1341853002
* Revert of Test that GrFragmentProcessors work without input colors. ↵Gravatar bsalomon2015-09-14
| | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/1341853002/ ) Reason for revert: Need to fix up more processor subclasses. Original issue's description: > Test that GrFragmentProcessors work without input colors. > > Committed: https://skia.googlesource.com/skia/+/72c58e7052af2a0855412ce4b249f977069db751 TBR=joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1338403003
* Test that GrFragmentProcessors work without input colors.Gravatar bsalomon2015-09-14
| | | | Review URL: https://codereview.chromium.org/1341853002
* Fix GPU-only snapping bug in mask blur renderingGravatar robertphillips2015-09-14
| | | | | | | | | | | The existing mask effect code in Ganesh is subject to snapping issues (when the created mask is redrawn). This artifact can be seen by rendering the original geometry (w/o blurs) and comparing that result to a rendering of the unblurred masks. W/o this patch the results do not match up (they are arbitrarily shifted by a pixel). This patch will require rebaselining and suppressions. Chromium layout tests suppressions are here: https://codereview.chromium.org/1342683003/ (Add layout test suppressions for upcoming Skia roll) Review URL: https://codereview.chromium.org/1338183002