aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
Commit message (Collapse)AuthorAge
* remove references to kIndex_8_SkColorType from our tools/testsGravatar Mike Reed2017-07-12
| | | | | | | | | Bug: skia:6828 Change-Id: Ib5049c28c11b7320bece20f5a0a886de8b2a4343 Reviewed-on: https://skia-review.googlesource.com/22728 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Change image encode api to return sk_sp""Gravatar Mike Reed2017-07-12
| | | | | | | | | | This reverts commit 64778d9f275d8ce3df8f4ab39ff334b7ef5b70d3. Bug: skia: Change-Id: I779515ff1e16a40c33890a4bac7a8a07171aadfe Reviewed-on: https://skia-review.googlesource.com/22261 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Reland "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original change's description: > > Remove support for decoding to kIndex_8 > > > > Fix up callsites, and remove tests that no longer make sense. > > > > Bug: skia:6828 > > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > > Reviewed-on: https://skia-review.googlesource.com/21664 > > Reviewed-by: Derek Sollenberger <djsollen@google.com> > > Commit-Queue: Leon Scroggins <scroggo@google.com> > > TBR=djsollen@google.com,scroggo@google.com > > Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6828 > Reviewed-on: https://skia-review.googlesource.com/22120 > Reviewed-by: Leon Scroggins <scroggo@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Bug: skia:6828 Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8 Reviewed-on: https://skia-review.googlesource.com/22320 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Correctly set encoder options according to color spaceGravatar Brian Osman2017-07-11
| | | | | | | | | | | The default value is kRespect, so we were always using that value. Replace that with more explicit (and correct) logic. Bug: skia: Change-Id: I6984a96fa16033f41824851cade3ff046b0fae94 Reviewed-on: https://skia-review.googlesource.com/22260 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Change image encode api to return sk_sp"Gravatar Mike Reed2017-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dc799550e2d9965aa5b7cda496465b2a76b310a5. Reason for revert: need to fix sites in Document_none Original change's description: > Change image encode api to return sk_sp > > Bug: skia: > Change-Id: I238289bc630be27795cb1384955dd6e887597c05 > Reviewed-on: https://skia-review.googlesource.com/22208 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> TBR=scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: Id7f67027e5f1405a60fdbde29863cdf8daef0cb7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/22280 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Change image encode api to return sk_spGravatar Mike Reed2017-07-11
| | | | | | | | Bug: skia: Change-Id: I238289bc630be27795cb1384955dd6e887597c05 Reviewed-on: https://skia-review.googlesource.com/22208 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* GMs: Call SkBitmap::notifyPixelsChanged()Gravatar Hal Canary2017-07-11
| | | | | | | | | | Motivation: SkPDF uses the generation ID to to de-duplicate bitmaps. gammaencodedpremul.cpp was not drawing correctly before this change. Change-Id: I6c59758ee0693f18e6ed7c51b22ee748af604ddc Reviewed-on: https://skia-review.googlesource.com/22207 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "Remove support for decoding to kIndex_8"Gravatar Leon Scroggins2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 742a3e298fda669006147e4a305bab8452369b1f. Reason for revert: Breaking Android roll: frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorPtr = colorPtr; ~~~~~~~~~~~~ ^ frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions' codecOptions.fColorCount = colorCount; ~~~~~~~~~~~~ ^ Original change's description: > Remove support for decoding to kIndex_8 > > Fix up callsites, and remove tests that no longer make sense. > > Bug: skia:6828 > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 > Reviewed-on: https://skia-review.googlesource.com/21664 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Commit-Queue: Leon Scroggins <scroggo@google.com> TBR=djsollen@google.com,scroggo@google.com Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:6828 Reviewed-on: https://skia-review.googlesource.com/22120 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* Blur gm.Gravatar Herb Derby2017-07-10
| | | | | | | Change-Id: I47294ba47880237541dee8193df55e31b3487f24 Reviewed-on: https://skia-review.googlesource.com/22061 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Make SkImage_Lazy::onMakeColorSpace return a SkImage_LazyGravatar Christopher Cameron2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Make SkImage_Lazy::onMakeColorSpace return a new SkImage_Lazy with the color space of SkImage_Lazy::fInfo changed. Update the call to SkImageGenerator::getPixels to specify image info with this new color space. Update the call to SkImageGenerator::generateTexture to specify this new color space. Update SkPictureImageGenerator to respect the color space argument. Add a SkTransferFunctionBehavior argument to SkImageGenerator::generateTexture to indicate if color conversion is to be doing using an xform canvas. Update Generator_GrYUVProvider::refAsTextureProxy to include a color conversion step to respect this new color space. TBR=reed@google.com Bug:739559 Change-Id: I156a858884659e9dfae739a653bab2ef89274959 Reviewed-on: https://skia-review.googlesource.com/21605 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Christopher Cameron <ccameron@chromium.org> Reviewed-by: Christopher Cameron <ccameron@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove support for decoding to kIndex_8Gravatar Leon Scroggins III2017-07-10
| | | | | | | | | | Fix up callsites, and remove tests that no longer make sense. Bug: skia:6828 Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 Reviewed-on: https://skia-review.googlesource.com/21664 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* srgb conversion needs to be in unpremulGravatar Mike Reed2017-07-06
| | | | | | | | Bug: skia: Change-Id: Ic7dffb2cb30aae33a6c127ab10ea4282e1360114 Reviewed-on: https://skia-review.googlesource.com/21536 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unneeded code for index8 imagseGravatar Mike Reed2017-07-03
| | | | | | | | Bug: skia:6828 Change-Id: I039d6bc35a1ed93ce747247f32fe4e9d5b09da0c Reviewed-on: https://skia-review.googlesource.com/21400 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Added new edge handling mode (clamp and repeat) to Gaussian blur filter.Gravatar wutao2017-06-30
| | | | | | | | | | | | | | | | | | | Gaussian blur filter will interpolate value by using out of bounds coords, which is 0. This makes it appears darker near the bounds in the blurred images. There are two issues: 1) when downsampling and upsampling, we should use GrTextureDomainEffect kClamp_Mode to clamp the texture coords to the bounds; 2) during Gaussian blur, we need to clamp to texture bounds. BUG=622128 TEST=cc_unittests, GM image test & manual. Some test results can be found at: https://bugs.chromium.org/p/chromium/issues/detail?id=622128#c49 Change-Id: I9283da1d91efb0da94a991f2d372e9f62c288bdc Reviewed-on: https://skia-review.googlesource.com/20465 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Allow caps on hairlines for gpu dashed linesGravatar Greg Daniel2017-06-30
| | | | | | | | Bug: skia: Change-Id: Ie3b61e0a308f7cbec65166f2f2ac4fe3cc5d16d0 Reviewed-on: https://skia-review.googlesource.com/21364 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Fix gpu dashing for case when circle dashes are large enough to overlapGravatar Greg Daniel2017-06-29
| | | | | | | | Bug: skia: Change-Id: I7153b28103c5ca0947c37d57357b64bf2aa884e5 Reviewed-on: https://skia-review.googlesource.com/20979 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Improve handling of clip stack IDGravatar Robert Phillips2017-06-28
| | | | | | | Change-Id: I1d5cf06d9b50c370f969a8778181fe94f7d35844 Reviewed-on: https://skia-review.googlesource.com/21061 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix recipes/tests for new Debian botsGravatar Eric Boren2017-06-28
| | | | | | | | Bug: skia:6612 Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24 Reviewed-on: https://skia-review.googlesource.com/21141 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* Fix for Android batching bugGravatar Robert Phillips2017-06-28
| | | | | | | | | | | | | | | On Android it looks like we have: stencilClip1 draw1 stencilClip2 draw2 where draw1 is being forward combined with draw2 b.c. they are both stencil clipped but it shouldn't b.c. they are different stencil clips. Change-Id: Ia704d7ab869022a055eed0726e2b7fab8eaaf817 Reviewed-on: https://skia-review.googlesource.com/20977 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Adjust path_stroke_with_zero_length to draw on pixel centersGravatar Brian Osman2017-06-27
| | | | | | | | Bug: skia: Change-Id: I1183574de4e3a429fe00c5a6a0f71745f1f6f5b4 Reviewed-on: https://skia-review.googlesource.com/20969 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Expand 2pt conical gradient gm with repeat/mirrorGravatar Florin Malita2017-06-27
| | | | | | | Change-Id: Iabb67dbf133690c649e9687233c4bfcb396db0cf Reviewed-on: https://skia-review.googlesource.com/20971 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkImageFilter::MakeBlur entry pointGravatar Robert Phillips2017-06-27
| | | | | | | | | AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter. Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2 Reviewed-on: https://skia-review.googlesource.com/20837 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add GM image test for blur with clamp mode.Gravatar wutao2017-06-27
| | | | | | | | | | | | | Adding a GM (Golden Master) image test in Skia to reproduce the bleed black issue in Chrome. This would allow regressions to be caught in Skia's status page before being rolled into Chrome. Bug: 622128 Change-Id: Ifd2824fff59483c8e4be48392ba467414d41ca13 TEST=imageblurclampmode.cpp Reviewed-on: https://skia-review.googlesource.com/20778 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* fix repeat/mirror sampling bleedGravatar Mike Klein2017-06-22
| | | | | | | | | | | | | | | | | I think this has been broken since we tried to simplify this in https://skia-review.googlesource.com/16547 The HSW backend does still look a little wrong, but improved, and the others seem fixed. Can you see how this affects your test cases, layout tests, etc? BUG=skia:6783 Change-Id: I17957ac8100331bea5b64d674bf43105048b72f6 Reviewed-on: https://skia-review.googlesource.com/20548 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* remove unused mode parameter from SkMergeImageFilterGravatar Mike Reed2017-06-19
| | | | | | | | Bug: skia: Change-Id: Iaa46aaef130a337987c3528685f59c56387d4a7d Reviewed-on: https://skia-review.googlesource.com/20210 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* remove unused variants in imagefilter factoriesGravatar Mike Reed2017-06-19
| | | | | | | | Bug: skia: Change-Id: Ife12bfa1c16f9dd87b24f73d3b260b0d2f46c7df Reviewed-on: https://skia-review.googlesource.com/20207 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Clean up GrResourceProvider usageGravatar Robert Phillips2017-06-15
| | | | | | | | | | | | | The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to ↵Gravatar Brian Salomon2017-06-15
| | | | | | | | | | | | GrMeshDrawOp subclasses."" This reverts commit a0485d94529905e76320b7aa941a0d94b5578ac2. Bug: skia: Change-Id: If50b2d1af285a6c3c943373bb7258b56e1af28d6 Reviewed-on: https://skia-review.googlesource.com/19961 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp ↵Gravatar Brian Salomon2017-06-14
| | | | | | | | | | | | | | | | | | | subclasses." This reverts commit 1ec03f33cf493352174c748662d4a3cca29f78fd. Revert "Fix logic reversal in NonAAFillRectOp test factory" This reverts commit 89c1c2552ec5b9ad8949988f7c9532a298b55987. Reason: Unexpected GM changes. Bug: skia: Change-Id: I9edf5f0e4a54b5cad86bd438a505aaaef38563de Reviewed-on: https://skia-review.googlesource.com/19960 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Converts remaining rect ops from GrLegacyMeshDrawOp to GrMeshDrawOp subclasses.Gravatar Brian Salomon2017-06-14
| | | | | | | | | | | Consolidates op factory functions to a rewritten GrRectOpFactory. Removes GrRenderTargetContext::drawNonAAFilledRect() in favor of creating and adding ops directly by the callers. Change-Id: I57e5fc739bf4e92b4a4710c739e6d22cce82a479 Reviewed-on: https://skia-review.googlesource.com/17711 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Retract GrTexture*.h & GrRenderTarget*.h from other headersGravatar Robert Phillips2017-06-13
| | | | | | | | | This does push some additional work (& includes) into the .cpp files. Change-Id: I27c847e371802270d13594dcc22aae44039990bb Reviewed-on: https://skia-review.googlesource.com/19660 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland DeferredTextureImageData low-bit-depth/dithering supportGravatar Eric Karl2017-06-12
| | | | | | | | | | | | | Cause DeferredTextureImageData functionality to support low bit depth (4444, 565) image formats (with dithering). Updated to handle colorspace + 4444 colortype correctly. Bug: 720105 Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089 Reviewed-on: https://skia-review.googlesource.com/19094 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Retract GrTexture.h a bitGravatar Robert Phillips2017-06-09
| | | | | | | | | This began as cleaning up SkSpecialImage.h & spiraled out of control from there. Change-Id: I9a570ecd2a7af9ee724ebfebe4e9185748f38bbc Reviewed-on: https://skia-review.googlesource.com/19290 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Improve cubic KLM accuracyGravatar Chris Dalton2017-06-09
| | | | | | | | | | | | | | | | | | | | | | Moves cubic root finding logic out of GrPathUtils and PathOpsCubicIntersectionTest, and unifies it in SkGeometry. "Normalizes" the homogeneous parameter values of the roots, rather than the cubic inflection function. Does this normalization by twiddling the exponents instead of division (which causes a loss of precision). Abandons the built-in derivatives in GrCubicEffect. These don't have high enough precision on many mobile gpus. Instead we pass the KLM matrix to the vertex shader via uniform, where we can use it to set up new linear functionals from which the fragment shader can calculate the gradient of the implicit function. Bug: skia:4410 Change-Id: Ibd64e999520adc8cdef7803a492d3699995aef5a Reviewed-on: https://skia-review.googlesource.com/19017 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Extend composeshader to support a lerp parameterGravatar Mike Reed2017-06-09
| | | | | | | | Bug: skia: Change-Id: I3bbb2cb8d0a84fca0309654498548ebc94d8938f Reviewed-on: https://skia-review.googlesource.com/18460 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* specialize D32 proc for legacy srcGravatar Mike Reed2017-06-09
| | | | | | | | | | lots of dead-code removal Bug: skia: Change-Id: I23ea25eb38855b4776e97fa8ff777d9744baab1d Reviewed-on: https://skia-review.googlesource.com/19147 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "DeferredTextureImageData low-bit-depth/dithering ↵Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support""" This reverts commit 840ff8837bd93ee73c187890839b3f56e7c94fb7. Reason for revert: Not obvious to me how to fix, reverting the chrome CL that was dependent on this. Original change's description: > Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support"" > > This reverts commit d7c681d6a7b154d276e275becc51685eac8705c2. > > Reason for revert: New param already used in Chrome > > Original change's description: > > Revert "DeferredTextureImageData low-bit-depth/dithering support" > > > > This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. > > > > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 > > > > Original change's description: > > > DeferredTextureImageData low-bit-depth/dithering support > > > > > > Cause DeferredTextureImageData functionality to support low bit depth > > > (4444, 565) image formats (with dithering). > > > > > > Bug: 720105 > > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > > > Reviewed-on: https://skia-review.googlesource.com/18945 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Eric Karl <ericrk@chromium.org> > > > > TBR=bsalomon@google.com,ericrk@chromium.org > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 720105 > > > > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b > > Reviewed-on: https://skia-review.googlesource.com/19039 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 720105 > > Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3 > Reviewed-on: https://skia-review.googlesource.com/19041 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I63eb0051964ce99e187b4e4943ea79bc22d392d2 Reviewed-on: https://skia-review.googlesource.com/19046 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "DeferredTextureImageData low-bit-depth/dithering support""Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d7c681d6a7b154d276e275becc51685eac8705c2. Reason for revert: New param already used in Chrome Original change's description: > Revert "DeferredTextureImageData low-bit-depth/dithering support" > > This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. > > Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 > > Original change's description: > > DeferredTextureImageData low-bit-depth/dithering support > > > > Cause DeferredTextureImageData functionality to support low bit depth > > (4444, 565) image formats (with dithering). > > > > Bug: 720105 > > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > > Reviewed-on: https://skia-review.googlesource.com/18945 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Eric Karl <ericrk@chromium.org> > > TBR=bsalomon@google.com,ericrk@chromium.org > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 720105 > > Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b > Reviewed-on: https://skia-review.googlesource.com/19039 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reviews@skia.org,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I91e690d0564f04209a2bd677de9ae9eb9c0f90d3 Reviewed-on: https://skia-review.googlesource.com/19041 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "DeferredTextureImageData low-bit-depth/dithering support"Gravatar Brian Salomon2017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2c075e749d1f33dea06ad2710e15c9a1d60ebced. Reason for revert: Breaking tests. e.g.: https://chromium-swarm.appspot.com/task?id=369dc44f62ce9510&refresh=10 Original change's description: > DeferredTextureImageData low-bit-depth/dithering support > > Cause DeferredTextureImageData functionality to support low bit depth > (4444, 565) image formats (with dithering). > > Bug: 720105 > Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 > Reviewed-on: https://skia-review.googlesource.com/18945 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Eric Karl <ericrk@chromium.org> TBR=bsalomon@google.com,ericrk@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 720105 Change-Id: I07aec722425efc62bc54f82cee9a19a9bf339f7b Reviewed-on: https://skia-review.googlesource.com/19039 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove SkLinearGradient::kForce4fContext_PrivateFlagGravatar Florin Malita2017-06-07
| | | | | | | | | | | | ... and related tests/gms. We now exercise the 4f impl with raster-pipeline/burst, no need for a special test flag. Change-Id: If67684d2d8840b3c413db9eeebb051f59cbc5a34 Reviewed-on: https://skia-review.googlesource.com/19025 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* DeferredTextureImageData low-bit-depth/dithering supportGravatar Eric Karl2017-06-07
| | | | | | | | | | | Cause DeferredTextureImageData functionality to support low bit depth (4444, 565) image formats (with dithering). Bug: 720105 Change-Id: Ie3b5768ebc393d9b0a5322461c722bf37c80b791 Reviewed-on: https://skia-review.googlesource.com/18945 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Eric Karl <ericrk@chromium.org>
* Make SkCodec more flexible about its required frameGravatar Leon Scroggins III2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkCodec sets fRequiredFrame to be the earliest possible frame that a given frame can depend on. e.g. - Frame A fills the screen, Keep - Frame B does not cover A, Keep - Frame C covers B but not A, and is opaque Frame C can depend on either A or B. SkCodec already reports that C depends on A. This CL allows a client of SkCodec to use either A or B to create C. Also expose the DisposalMethod. Since any frame between A and C can be used to create C except for DisposePrevious frames, the client needs to be able to know the disposal method so they do not try to use such a frame to create C. Further, the disposal method can be used to give the client a better idea whether they will continue to need a frame. (e.g. if frame i is DisposePrevious and depends on i-1, the client may not want to steal i-1 to create i, since i+1 may also depend on i-1.) TODO: Share code for decoding prior frames between GIF and WEBP Change-Id: I91a5ae22ba3d8dfbe0bde833fa67ae3da0d81ed6 Reviewed-on: https://skia-review.googlesource.com/13722 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* GM for drawImage w/ maskFilterGravatar Hal Canary2017-06-07
| | | | | | | | BUG=skia:237 Change-Id: I8b06fa5b0e05af28e010ccbd2772c64e3eaefdde Reviewed-on: https://skia-review.googlesource.com/19026 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Fix croppedrects GMGravatar Chris Dalton2017-06-07
| | | | | | | | | | | | | The stroke-to-rect test was accidentally doing both non-aa draws and non-filtered texture sampling on exact half pixel boundaries. So sometimes the CPU and GPU rounded in different directions. This CL updates the draws and sampling to fall on integer boundaries. Bug: skia:5522 Change-Id: If968bcbb327106eba8919e4abf3a7211c5326daf Reviewed-on: https://skia-review.googlesource.com/18960 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Update showmiplevel gm to round coords the same for both variations of the GMGravatar Greg Daniel2017-06-07
| | | | | | | | | | | | | | | | The versions of showmiplevel that take both a width and height, round the coords of draws to integers. The basic version did not do this which caused sampling bugs on adreno when using nearest neighbor at half pixel coords. Since this GM isn't testing the GPU rendering of the mips, this workaround is okay. Bug: skia:5905 Change-Id: I4080532e8c1f37d74c60089970c5d0fc83cd5373 Reviewed-on: https://skia-review.googlesource.com/18939 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* GrTessellator: implement out-of-range splitting and AEL rewinding.Gravatar Stephen White2017-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to floating point inaccuracy, when intersecting edges, the intersection point may fall above one of the edges' top vertices or below one of the bottom vertices. In these cases, we were simply splitting one edge on the relevant endpoint of the other edge. This is incorrect if the intersection is far from the endpoint (e.g., the test case in the linked bug, where one of the intersected edges is near-horizontal but the intersection falls below both of its endpoints, in the middle of the edge.) The correct solution is to split both edges as normal, and take care to produce edges with the correct ordering where the intersection is above or below an edge. However, since the new vertex may be above the current vertex, simply restarting intersection checks at the current vertex won't work. We need to process the intersection vertex before the current one. This introduces another problem: unlike all other splitting modes (which always shorten edges), splitting an edge above the top or below the bottom can lengthen it, causing it to violate the AEL with an adjacent edge which then shortens it back to the original point (in cleanup_active_edges()). Since the splitting and merging code can't agree, we loop forever. Instead of simply fusing neighboring edges in cleanup_active_edges(), the proper fix to this problem is to detect the AEL violation and rewind all processing to the vertex above it. For performance, we only rewind when we detect that a split edge is no longer ordered within the mesh (merge_enclosing_edges()) or within the the AEL (rewind_if_necessary()). We also store the enclosing edges of each vertex, which allows us to rewind quickly, since we know exactly which edges need to be added/removed from the AEL. cleanup_active_edges(), fix_active_state() and Vertex::fProcessed have been removed. In their place are rewind_active_edges() and rewind_if_necessary(), which uses the same logic as cleanup_active_edges() but uses it to know when to rewind. Bug: skia:5026 Change-Id: I3638a429f5428498d6df6bb7b98c67374dc291aa Reviewed-on: https://skia-review.googlesource.com/18900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Create an SkColorSpaceXform image generatorGravatar Matt Sarett2017-06-06
| | | | | | | | | | | | | | | | | This should be immediately useful in the Skia-Android rendering pipeline. Possible future uses include creating a "renderable" SkImage from a bitmap with a funny color space. Inspired by: https://skia-review.googlesource.com/c/13981/ Bug: b/62347704 Change-Id: I388c7af1fc43834b8ad22022d0caf3ac90b734c8 Reviewed-on: https://skia-review.googlesource.com/18598 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* In shapes_as_paths, draw zoom from pixmaps, not imagesGravatar Brian Osman2017-06-05
| | | | | | | | | | | | Trying to track down why the Galaxy S6 sometimes claims that every pixel is different, even though the zoomed images look identical. It's helpful to draw what's actually being diffed. Bug: skia:6653 Change-Id: Ia577aa70ed11d806fa204eaffdef41e6a65a60f2 Reviewed-on: https://skia-review.googlesource.com/18623 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Better image for copyTo4444 testGravatar Matt Sarett2017-06-01
| | | | | | | | | | This one produces noticeable differences if we fail to dither. Bug:720105 Change-Id: I208d0c8147f4cca1b484f2f55edc09ce1bef2dcb Reviewed-on: https://skia-review.googlesource.com/18036 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>