aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
Commit message (Collapse)AuthorAge
...
* 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>
* fix and test colorfiltershaderGravatar Mike Reed2017-06-01
| | | | | | | | | Bug: skia: Change-Id: I02fd77796880b42ce55549a8340b116e1c5f19d6 Reviewed-on: https://skia-review.googlesource.com/18305 Commit-Queue: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Delete SkGaussianEdgeShader""Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d14f936cc09de2a37c05c7af2cf60aa31f74722. Reason for revert: Android fix merged. Original change's description: > Revert "Delete SkGaussianEdgeShader" > > This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. > > Reason for revert: pending Android fix merge. > > Original change's description: > > Delete SkGaussianEdgeShader > > > > No longer used. > > > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > > Reviewed-on: https://skia-review.googlesource.com/18132 > > Reviewed-by: Jim Van Verth <jvanverth@google.com> > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > > > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > > Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 > Reviewed-on: https://skia-review.googlesource.com/18156 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ia6c97a79a6425a28fab49984691505bf89ac9736 Reviewed-on: https://skia-review.googlesource.com/18227 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Delete SkGaussianEdgeShader"Gravatar Florin Malita2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64790a3714467300848971aa153aca8cea91cf7b. Reason for revert: pending Android fix merge. Original change's description: > Delete SkGaussianEdgeShader > > No longer used. > > Change-Id: I65a61696060ca19f528066ea587e140798450e36 > Reviewed-on: https://skia-review.googlesource.com/18132 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=jvanverth@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I88a428e942c78b1fc8e70501ba7fdda5727b2ab2 Reviewed-on: https://skia-review.googlesource.com/18156 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Delete SkGaussianEdgeShaderGravatar Florin Malita2017-05-30
| | | | | | | | | No longer used. Change-Id: I65a61696060ca19f528066ea587e140798450e36 Reviewed-on: https://skia-review.googlesource.com/18132 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add GM to test the IgnoreTransform flag on blursGravatar Greg Daniel2017-05-30
| | | | | | | | Bug: skia: Change-Id: I2525daa83d78280e4be3b31b66dc4f13971af311 Reviewed-on: https://skia-review.googlesource.com/18066 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Reland of SkShaderBaseGravatar Florin Malita2017-05-25
| | | | | | | | | | Introduce a private base class (SkShaderBase), to hide implementation details from the public interface (SkShader). Change-Id: Ib1d76cde880bd51868b97408710f8bb38128e536 Reviewed-on: https://skia-review.googlesource.com/17925 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "SkShaderBase"Gravatar Florin Malita2017-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 58a756435ca3700d9766a4580bb0771a9774f603. Reason for revert: g3, Android borkage. Original change's description: > SkShaderBase > > Introduce a private base class (SkShaderBase), to hide > implementation details from the public interface (SkShader). > > Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176 > Reviewed-on: https://skia-review.googlesource.com/17241 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I32b012ee466dd006c074593f211f43ed602f1078 Reviewed-on: https://skia-review.googlesource.com/17845 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* SkShaderBaseGravatar Florin Malita2017-05-24
| | | | | | | | | | Introduce a private base class (SkShaderBase), to hide implementation details from the public interface (SkShader). Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176 Reviewed-on: https://skia-review.googlesource.com/17241 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* SkSTArenaAllocGravatar Florin Malita2017-05-24
| | | | | | | | | Syntactic sugar, gets rid of some boilerplate. Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340 Reviewed-on: https://skia-review.googlesource.com/17837 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* add image variant to patch gmGravatar Mike Reed2017-05-24
| | | | | | | | Bug: skia: Change-Id: Icaa1e2854775d8a79a8b3520163a863605336d05 Reviewed-on: https://skia-review.googlesource.com/17792 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Legacy raster still doesn't handle transparent LCDGravatar Brian Osman2017-05-23
| | | | | | | | | Bug: skia:6655 Change-Id: I1431fb5bcf955dd32c15dad9d24a6a7a7aa626f0 Reviewed-on: https://skia-review.googlesource.com/17788 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* add gm to test alpha in drawPatchGravatar Mike Reed2017-05-23
| | | | | | | | | Bug: skia: Change-Id: I79d0b0707b09a3eedeeaee940d6dafbbbdbe2fe2 Reviewed-on: https://skia-review.googlesource.com/17707 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix TSAN error for shadow cacheGravatar Jim Van Verth2017-05-23
| | | | | | | Change-Id: I84b94a19c724e2152d1eac269f425f7f0f2286f5 Reviewed-on: https://skia-review.googlesource.com/17706 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Remove compressed (ETC1) texture support from Ganesh (take 2)Gravatar Robert Phillips2017-05-23
| | | | | | | | | | Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files TBR=bsalomon@google.com Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f Reviewed-on: https://skia-review.googlesource.com/17700 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix TSAN botGravatar Jim Van Verth2017-05-23
| | | | | | | | Bug: skia: Change-Id: I5626e4e4277255b1c0c10f912829ac2cd2ed1a8c Reviewed-on: https://skia-review.googlesource.com/17600 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Cache ambient and spot shadows at a canonical positionGravatar Jim Van Verth2017-05-22
| | | | | | | Change-Id: I1f80931513f7d2268b358fb38c86dd331f32f064 Reviewed-on: https://skia-review.googlesource.com/17394 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove compressed (ETC1) texture support from Ganesh"Gravatar Brian Osman2017-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ee26363aaae62db2a851f2873e2405a9cf7f995a. Reason for revert: Failing Google 3 roll. Original change's description: > Remove compressed (ETC1) texture support from Ganesh > > Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667 > Reviewed-on: https://skia-review.googlesource.com/17456 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ie1a57187287e03600a69e374501478e93c41415c Reviewed-on: https://skia-review.googlesource.com/17527 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove compressed (ETC1) texture support from GaneshGravatar Robert Phillips2017-05-22
| | | | | | | Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667 Reviewed-on: https://skia-review.googlesource.com/17456 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Disable resource cache in shadow_utils GM for now""Gravatar Jim Van Verth2017-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b58ef7b525e5325ecd194c4b470e4c924cbb56a. Reason for revert: Wasn't actually fixed. Original change's description: > Revert "Disable resource cache in shadow_utils GM for now" > > This reverts commit c34a946d5a975ba8b8cd51f79b55174a5ec0f99f. > > Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/. > > Original change's description: > > Disable resource cache in shadow_utils GM for now > > > > This should make the GMs more stable in tiled mode. > > > > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 > > Reviewed-on: https://skia-review.googlesource.com/17275 > > Reviewed-by: Mike Reed <reed@google.com> > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > > > TBR=jvanverth@google.com,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583 > Reviewed-on: https://skia-review.googlesource.com/17304 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If606795bfeb4e6ed78f199fcb86ee2767bde5216 Reviewed-on: https://skia-review.googlesource.com/17371 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Hide SkPerlinNoiseShader impl detailsGravatar Florin Malita2017-05-18
| | | | | | | | | | Move the shader impl to a private class, leave SkPerlinNoiseShader as a factory class only (similar to e.g. SkLightingShader). Change-Id: Ic1180db8f5dfd3d8f6fba133c6bf6bbdfa4f97a4 Reviewed-on: https://skia-review.googlesource.com/17318 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Disable resource cache in shadow_utils GM for now"Gravatar Jim Van Verth2017-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c34a946d5a975ba8b8cd51f79b55174a5ec0f99f. Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/. Original change's description: > Disable resource cache in shadow_utils GM for now > > This should make the GMs more stable in tiled mode. > > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 > Reviewed-on: https://skia-review.googlesource.com/17275 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> > TBR=jvanverth@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583 Reviewed-on: https://skia-review.googlesource.com/17304 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Disable resource cache in shadow_utils GM for nowGravatar Jim Van Verth2017-05-17
| | | | | | | | | This should make the GMs more stable in tiled mode. Change-Id: I72996b1305fc99e60626af35267952d0a5c38624 Reviewed-on: https://skia-review.googlesource.com/17275 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add GM to verify that drawX == (path.addX, drawPath)Gravatar Brian Osman2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This demonstrates a new kind of hybrid unit test/GM. It creates a grid of cells. In each cell, we do two renders that are expected to produce the same result. For each cell, we render the two results overlaid, and highlight any differing pixels in red. Assuming there is a diff, the area around the largest diff is drawn zoomed in from both images. Matching cells are outlined in green, failing cells are outlined in red. Triaging this GM just involves answering the question: "Are there any red boxes?" "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png To get more tests to pass, (and fix an assert in Ganesh), I've gone ahead and enforced that user supplied rects (in drawRect and drawOval) are always sorted once they hit the canvas virtuals. Currently, drawArc rejects empty ovals, but I added the same assert to onDrawArc, if we decide to change the strategy there. Re-land of: https://skia-review.googlesource.com/c/16983/ Bug: skia: Change-Id: I48f85de5f2bcb7fdc9558c2fd80cb1f20800b244 Reviewed-on: https://skia-review.googlesource.com/17270 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Add GM to verify that drawX == (path.addX, drawPath)"Gravatar Greg Daniel2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 78d1b428a8e8a0b76e88e9266d2893136acd5906. Reason for revert: break preabandongpu bot Original change's description: > Add GM to verify that drawX == (path.addX, drawPath) > > This demonstrates a new kind of hybrid unit test/GM. > It creates a grid of cells. In each cell, we do two > renders that are expected to produce the same result. > For each cell, we render the two results overlaid, > and highlight any differing pixels in red. Assuming > there is a diff, the area around the largest diff > is drawn zoomed in from both images. > > Matching cells are outlined in green, failing cells > are outlined in red. Triaging this GM just involves > answering the question: "Are there any red boxes?" > > "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png > "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png > > To get more tests to pass, (and fix an assert > in Ganesh), I've gone ahead and enforced that user > supplied rects (in drawRect and drawOval) are > always sorted once they hit the canvas virtuals. > Currently, drawArc rejects empty ovals, but I added > the same assert to onDrawArc, if we decide to change > the strategy there. > > Bug: skia: > Change-Id: I021a18c85e234298e1d29f333662683d996dd42c > Reviewed-on: https://skia-review.googlesource.com/16983 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Klein <mtklein@chromium.org> > Reviewed-by: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Bug: skia: Change-Id: Id1ead4e22115c49cad5d0adb6151ede81734b4d3 Reviewed-on: https://skia-review.googlesource.com/17269 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add GM to verify that drawX == (path.addX, drawPath)Gravatar Brian Osman2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This demonstrates a new kind of hybrid unit test/GM. It creates a grid of cells. In each cell, we do two renders that are expected to produce the same result. For each cell, we render the two results overlaid, and highlight any differing pixels in red. Assuming there is a diff, the area around the largest diff is drawn zoomed in from both images. Matching cells are outlined in green, failing cells are outlined in red. Triaging this GM just involves answering the question: "Are there any red boxes?" "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png To get more tests to pass, (and fix an assert in Ganesh), I've gone ahead and enforced that user supplied rects (in drawRect and drawOval) are always sorted once they hit the canvas virtuals. Currently, drawArc rejects empty ovals, but I added the same assert to onDrawArc, if we decide to change the strategy there. Bug: skia: Change-Id: I021a18c85e234298e1d29f333662683d996dd42c Reviewed-on: https://skia-review.googlesource.com/16983 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Remove GrSurfaceProxy::desc()Gravatar Brian Salomon2017-05-17
| | | | | | | | | | Adds a numStencilSamples() getter. Bug: skia: Change-Id: I1e57f19b3cb490a6214ea436622ed8128a5a9303 Reviewed-on: https://skia-review.googlesource.com/16994 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix shadow_utils light position for SampleApp tilingGravatar Jim Van Verth2017-05-17
| | | | | | | Change-Id: Icddc82a095aa698bdba9004641acdc411392632f Reviewed-on: https://skia-review.googlesource.com/17044 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move files out of private, and fix up callers to IWYUGravatar Mike Reed2017-05-16
| | | | | | | | | | Realized that a pending CL needed to add (yet another) private type to SkRecords.h, but w/o this CL I'd be forced to move that header also into private. This change frees us up to not have transitive exposure for types that need to be recorded. Bug: skia: Change-Id: Id79f1c2e44ba85e063c1360cf96c92de6397ca2b Reviewed-on: https://skia-review.googlesource.com/17031 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* clamp to premul in ditherGravatar Mike Klein2017-05-16
| | | | | | | | | | | | | Dither can bump color values above alpha (duh), or below zero (duh), so clamp back to premul after dithering. BUG=skia:6644,skia:6643 Change-Id: Ida107e866380e06130af0d01467117bca929ba44 Reviewed-on: https://skia-review.googlesource.com/17070 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* SkCanvas: Helpers for draw{Point,Line,Circle}Gravatar Hal Canary2017-05-16
| | | | | | | Change-Id: Ie9c7d3b8f01aee435563b23b7d27f098f07dd287 Reviewed-on: https://skia-review.googlesource.com/16909 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>