aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Defend against ICOs with large BMPs embeddedGravatar Leon Scroggins III2017-06-05
| | | | | | | | | | | If the ICO reports that it has a large BMP file embedded, do not crash if we attempt to allocate too much memory. Bug: b/38116746 Change-Id: I70eb66f5e4ffc15587007b398bbe843665eae500 Reviewed-on: https://skia-review.googlesource.com/18447 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* sk_sp-ify GrResourceProvider some moreGravatar Robert Phillips2017-06-05
| | | | | | | | | | I believe this addresses the concerns of this particular bug (although more remains to be done) Bug: skia:5327 Change-Id: Ie82f08f87b3cf3d7986fe4eeb16a5d2553173913 Reviewed-on: https://skia-review.googlesource.com/18599 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrSimpleMeshDrawOpHelper record whether coverage can be implemented as ↵Gravatar Brian Salomon2017-06-05
| | | | | | | | | | alpha This also makes the blend table entry for opaque src over indicate a blend of (1, ISA) rather than (1, 0) to match the actual implementation of the global src-over XP. Change-Id: I1b1f64d2546e4f0cf03c0239ce674d1baad655f6 Reviewed-on: https://skia-review.googlesource.com/18521 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make instantiate return a BooleanGravatar Robert Phillips2017-06-05
| | | | | | | | | | | | From an off-line conversation: The longer term idea will be to create a helper class isolates the ability to instantiate proxies until flush time. The peek* methods could then be moved to GrSurfaceProxy. Change-Id: I8e8c02c098475b77d515791c0d6b81f7e4a327dd Reviewed-on: https://skia-review.googlesource.com/18076 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* start on SkJumper lowp modeGravatar Mike Klein2017-06-04
| | | | | | | | | | | | | | | | Just 3 stages implemented so far: load_8888 swap_rb store_8888 That's enough to make the shortest non-trivial pipeline that you see in the new unit test. Change-Id: Iabf90866ab452f7183d8c8dec1405ece2db695dc Reviewed-on: https://skia-review.googlesource.com/18458 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@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>
* Remove accessRenderTarget call from Clear testsGravatar Robert Phillips2017-06-02
| | | | | | | | | In the split-opList world the full screen clear optimization no longer relies on the rendertarget ID. Change-Id: Ifc7bf10753355a18507998e30f9de7e8c1eb57c1 Reviewed-on: https://skia-review.googlesource.com/18497 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Re-land "Fixed an issue with sksl variable declarations"Gravatar Ethan Nicholas2017-06-02
| | | | | | | | | | This reverts commit affa6a3da87e9ea85f1d4fe3137b5bccbbc56f92. Bug: skia: Change-Id: I5864830e31acbf786f3ea7ae91f42f10aae6d855 Reviewed-on: https://skia-review.googlesource.com/18459 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Fixed an issue with sksl variable declarations"Gravatar Ethan Nicholas2017-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88bd8edcff23dc9cf31b664cba7ba73b235318b0. Reason for revert: unhappy bots Original change's description: > Fixed an issue with sksl variable declarations > > There was an issue where multiple variables defined in the same > declaration were not being sequenced appropriately during analysis, so > 'int x = 0, y = x + 1' would report that x was undefined. > > Bug: skia: > Change-Id: I882f7e216467306f6a6013a0a34aac30a4c60744 > Reviewed-on: https://skia-review.googlesource.com/18313 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=csmartdalton@google.com,ethannicholas@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Change-Id: Ibc68674289dce70b6173a347a0e78bb0f1e6db1b Reviewed-on: https://skia-review.googlesource.com/18457 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Fixed an issue with sksl variable declarationsGravatar Ethan Nicholas2017-06-02
| | | | | | | | | | | | There was an issue where multiple variables defined in the same declaration were not being sequenced appropriately during analysis, so 'int x = 0, y = x + 1' would report that x was undefined. Bug: skia: Change-Id: I882f7e216467306f6a6013a0a34aac30a4c60744 Reviewed-on: https://skia-review.googlesource.com/18313 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. Now that we're testing our TexStorage path, fix a few other problems that showed up: - Command Buffer doesn't like extension formats. - X86 PowerVR and Adreno devices don't like BGRA. Re-land of : https://skia-review.googlesource.com/18382 Re-re-land of: https://skia-review.googlesource.com/18261 BUG=skia: Change-Id: Ie12793549a6807300d6ece68cd6b92495e85c3fe Reviewed-on: https://skia-review.googlesource.com/18403 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Omnibus: Push instantiation of GrTextures later (post TextureSampler)Gravatar Robert Phillips2017-06-02
| | | | | | | | | | | | | Split into: https://skia-review.googlesource.com/c/10485/ (More GrSurfaceProxy-clean up) https://skia-review.googlesource.com/c/15819/ (Expand GrTextureProxy to handle highestFilterMode) https://skia-review.googlesource.com/c/16714/ (Switch ImageStorageAccess over to GrTextureProxies) https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Change-Id: I6cf3ba0f3bf0e1908d36749bc83571c066ddd568 Reviewed-on: https://skia-review.googlesource.com/10484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Expand texturability testing to cover mip-mapped textures, and fix iOS"Gravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2b5175e99c6451bdf34fa52900af39ee11a4a84. Reason for revert: Nexus 5 Original change's description: > Expand texturability testing to cover mip-mapped textures, and fix iOS > > Don't allow creation of mip-mapped textures when caps says we don't > support mip-mapping. > > Skip testing of mip-mapped resources in the resource size test, > when creation will fail. > > For iOS devices with ES2, the APPLE BGRA8888 extension is more > trouble than it's worth. Even though it lets the internal and > external formats not match, it appears that the driver remembers > the first external format, so subsequent attempts to upload with > the other swizzle will fail. Up until now, creation of these > textures was failing anyway, so now just make it more explicit > that we don't support BGRA in this situation. > > Re-land of: https://skia-review.googlesource.com/18261 > > BUG=skia: > > Change-Id: I910ffab0aa735647dce910d9054696c385f94933 > Reviewed-on: https://skia-review.googlesource.com/18382 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true BUG=skia: Change-Id: I8f0fd87678cc584ad37b2a93a859bd4ef38c8092 Reviewed-on: https://skia-review.googlesource.com/18401 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. Re-land of: https://skia-review.googlesource.com/18261 BUG=skia: Change-Id: I910ffab0aa735647dce910d9054696c385f94933 Reviewed-on: https://skia-review.googlesource.com/18382 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* update SkRasterPipeline::run() to also take yGravatar Mike Klein2017-06-01
| | | | | | | | | y isn't used yet. This is just a warmup that updates the callers. Change-Id: I78f4f44e2b82f72b3a39fa8a8bdadef1d1b8a99e Reviewed-on: https://skia-review.googlesource.com/18381 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Expand texturability testing to cover mip-mapped textures, and fix iOS"Gravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9f6f41b01bdc8144808e78128676087bfb310a27. Reason for revert: Command Buffer and ANGLE failures. Original change's description: > Expand texturability testing to cover mip-mapped textures, and fix iOS > > Don't allow creation of mip-mapped textures when caps says we don't > support mip-mapping. > > Skip testing of mip-mapped resources in the resource size test, > when creation will fail. > > For iOS devices with ES2, the APPLE BGRA8888 extension is more > trouble than it's worth. Even though it lets the internal and > external formats not match, it appears that the driver remembers > the first external format, so subsequent attempts to upload with > the other swizzle will fail. Up until now, creation of these > textures was failing anyway, so now just make it more explicit > that we don't support BGRA in this situation. > > BUG=skia: > > Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01 > Reviewed-on: https://skia-review.googlesource.com/18261 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true BUG=skia: Change-Id: I68f6bb3be9fbafa7366ef5611a12e372274aa648 Reviewed-on: https://skia-review.googlesource.com/18380 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add smartptr SkRWBuffer snapshot methodsGravatar Florin Malita2017-06-01
| | | | | | | Change-Id: Id816a38213a86bf090230ebaaef00d98a9487965 Reviewed-on: https://skia-review.googlesource.com/18266 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Expand texturability testing to cover mip-mapped textures, and fix iOSGravatar Brian Osman2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | Don't allow creation of mip-mapped textures when caps says we don't support mip-mapping. Skip testing of mip-mapped resources in the resource size test, when creation will fail. For iOS devices with ES2, the APPLE BGRA8888 extension is more trouble than it's worth. Even though it lets the internal and external formats not match, it appears that the driver remembers the first external format, so subsequent attempts to upload with the other swizzle will fail. Up until now, creation of these textures was failing anyway, so now just make it more explicit that we don't support BGRA in this situation. BUG=skia: Change-Id: Ic2e3ba1673398d542edd46a555ef47b5d0979c01 Reviewed-on: https://skia-review.googlesource.com/18261 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* raster pipeline sprite blitterGravatar Mike Klein2017-06-01
| | | | | | | | | | | The color in the unit test turned out to be right on the edge of not round tripping well, and I guess rounding pushed it over the edge, so I've tweaked it to a new one that seems better. Change-Id: I46095fafc9d6b68fd417ff9dc32003f42929c5a5 Reviewed-on: https://skia-review.googlesource.com/18238 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Disable deferred proxies for M60 branchGravatar Robert Phillips2017-05-31
| | | | | | | | Bug: 720325 Change-Id: I0529bbcd592bdc5d5a741731af8a66971e485649 Reviewed-on: https://skia-review.googlesource.com/18239 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add support for instanced drawsGravatar Chris Dalton2017-05-31
| | | | | | | | | | | | Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* fix incorrect variable not assigned error in skslcGravatar Ethan Nicholas2017-05-31
| | | | | | | | Bug: skia: Change-Id: Id89db8acb0b14024b79b00d98d32f9c10f019537 Reviewed-on: https://skia-review.googlesource.com/18121 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Add aarch64 tail code.Gravatar Herb Derby2017-05-30
| | | | | | | Change-Id: I25f029604a04f5fc6c249a3817b0dd84379071be Reviewed-on: https://skia-review.googlesource.com/18149 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add arm tail code.Gravatar Herb Derby2017-05-30
| | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android Change-Id: Ia0e9f32d0324e66c9d4812dbb156a2b858d49a13 Reviewed-on: https://skia-review.googlesource.com/18127 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix glDrawRangeElementsGravatar Chris Dalton2017-05-30
| | | | | | | | | | | | | | | | | | Adds explicit min/max index value fields to GrMesh. This eliminates the previous assumption that the index values were within the range [0..vertexCount-1]. In the pattern case we still maintain this assumption. Updates GrMesh to hide its fields and handle its new complexity using a "helper" interface instead. Adds a unit test for GrMesh. Bug: skia: Change-Id: Ia23de72d510f8827cee56072b727fb70a6e46b8d Reviewed-on: https://skia-review.googlesource.com/17964 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Convert DstTexture to DstProxy (take 2)Gravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revise system for checking for uninstantiated proxiesGravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | | The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add tests for tail handling in SkJumper.Gravatar Herb Derby2017-05-26
| | | | | | | Change-Id: Ib4ecc33dc9552c16b5530359cd3649487e70bbed Reviewed-on: https://skia-review.googlesource.com/18067 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Reduce tree depth on iOS tooGravatar Brian Osman2017-05-26
| | | | | | | | Bug: skia:6627 Change-Id: Ib92b62bf1191170a46e63f61fa9502ca2f9ee771 Reviewed-on: https://skia-review.googlesource.com/18072 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Really work around iOS varying limit in GLPrograms testGravatar Brian Osman2017-05-26
| | | | | | | | | Bug: skia:6627 Change-Id: I80142f5288e1c6f59f6add3a5a71ab90da90d3cc Reviewed-on: https://skia-review.googlesource.com/18069 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Add method to GrContext to purge unlocked resources.Gravatar Derek Sollenberger2017-05-26
| | | | | | | | | | | Beyond setting the total cache limits this method enables clients to request to purge a specific number of bytes, as well as specify their preference to purge scratch resources over resources of other types. Change-Id: I9259d5544d34251575d77eebe599388f213ff3ce Reviewed-on: https://skia-review.googlesource.com/17987 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* Add tail handling for SSE* to SkJumper.Gravatar Herb Derby2017-05-25
| | | | | | | Change-Id: Icb9d385333082de2f99b7a25cfd7251717e3f663 Reviewed-on: https://skia-review.googlesource.com/17580 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* GrTessellator: fix for three edges becoming collinear after splitting.Gravatar Stephen White2017-05-25
| | | | | | | | | | | | | In rare cases, a single edge can become collinear with two adjacent neighbour edges after it's split. The solution is to continue to merge until no collinear edges are found. BUG=722000 Change-Id: Ia5dd212b7acfb40ed1d6c74ebfa9e4a4746fe40a Reviewed-on: https://skia-review.googlesource.com/17963 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* 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>
* Disable MSAA for Intel GPUs and re-enable GrSurfaceRenderability testGravatar Robert Phillips2017-05-25
| | | | | | | | | This CL replaces: https://skia-review.googlesource.com/c/17710/ (Re-enable GrSurfaceRenderability test) Change-Id: I5626e4fc3581cd2b17fe0f0ad3a9e9bc35b7aa4c Reviewed-on: https://skia-review.googlesource.com/17764 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* make sure to_srgb maps 1 to 1Gravatar Mike Klein2017-05-25
| | | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE2,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-SK_CPU_LIMIT_SSE41,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android BUG=skia:6678,skia:6683 Change-Id: I217084fa0a11ad661a8751f0c3b1cade5cc52473 Reviewed-on: https://skia-review.googlesource.com/17902 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@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>
* Use rasterpipeline for drawVerticesGravatar Mike Reed2017-05-24
| | | | | | | | | Bug: skia: Change-Id: If6da119ee98f26981cef9373162ddb526db77be5 Reviewed-on: https://skia-review.googlesource.com/17422 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Add GrContext API to report the number of purgeable bytes in the cache.Gravatar Derek Sollenberger2017-05-24
| | | | | | | Change-Id: I1457eec9831736f386e3b3b80d9eac8dbb337a9b Reviewed-on: https://skia-review.googlesource.com/17829 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* SkRasterPipeline in SkArenaAllocGravatar Mike Klein2017-05-24
| | | | | | | | | Bug: skia:6673 Change-Id: Ia2bae4f6a9039a007a10b6b45bcf2f0854bf6e5c Reviewed-on: https://skia-review.googlesource.com/17794 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Revert "Add a flag to GrSurfaceFlags that requires the texture to be ↵Gravatar Brian Salomon2017-05-23
| | | | | | | | | | | | cleared upon creation. "" This reverts commit a9e795eab5f59a52d96b8fdc39351452835f5eb9. Bug: skia: Change-Id: Ibfc51497ae99f332f8f72a799393a1b2996f7f3f Reviewed-on: https://skia-review.googlesource.com/17767 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add a flag to GrSurfaceFlags that requires the texture to be cleared ↵Gravatar Brian Salomon2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon creation. " This reverts commit 45e5068a6d10f4e4fd4658824310f8871f02ccf7. Reason for revert: :'( Original change's description: > Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation. > > Bug: chromium:656320 > > Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1 > Reviewed-on: https://skia-review.googlesource.com/17391 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Bug: chromium:656320 Change-Id: I8a4f71537e45f3c4cf37b10b2dc8ee38fe6959ba Reviewed-on: https://skia-review.googlesource.com/17765 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a flag to GrSurfaceFlags that requires the texture to be cleared upon ↵Gravatar Brian Salomon2017-05-23
| | | | | | | | | | | creation. Bug: chromium:656320 Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1 Reviewed-on: https://skia-review.googlesource.com/17391 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add animation support to SkWebpCodecGravatar Leon Scroggins III2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TBR=reed@google.com (No change to the public API, but changed a header file) SkWebpCodec: - Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount - Respect the alpha reported by libwebp. Although the spec states that it is only a hint, the libwebp encoder uses it properly. Respecting allows us to draw opaque images faster and decode them to 565. This also matches other SkCodecs (and Chromium). - onGetPixels: - Decode the frame requested, recursively decoding required frame if necessary - When blending with a prior frame, use SkRasterPipeline SkCodec: - Move check for negative index to getFrameInfo - Reset the colorXform if one is not needed SkCodecAnimation: - Add new blend enum, for WebP's (and APNG's) non-blending option SkFrameHolder: - New base classes for frames and the owner of the frames, allowing code sharing between SkWebpCodec and SkGifCodec (particularly for determining whether a frame has alpha and what frame it depends on) - When moving items from SkGIFFrameContext, use Skia conventions (i.e. int instead of unsigned) - Rename "delay time" to "duration", to match e.g. SkFrameInfo:: fDuration SkGifImageReader: - Move pieces to SkFrameHolder, and adapt to changes made in the process - Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder) more general to support webp, and add support for frames that do not blend - Change SkGIFFrameContext from a struct to a class, to match how we use the distinction elsewhere (i.e. struct is a small object with public fields) - Rework hasTransparentPixel (now hasTransparency, since it returns true in some cases where there is not a transparent pixel) to better fit with the modified setAlphaAndRequiredFrame. Also be more consistent when there is no transparent pixel but no color map. - Simplify an if condition that was previously simplified in 2d61e717 but accidentally got reverted in a4db9be6 CodecAnimTest: - Test new animated webp files - Rearrange the test to more cleanly print alpha type mismatches for the first frame resources: - webp-animated.webp - animated webp from Chromium - blendBG.webp - new webp file using bits of webp-animated-semitransparent4.webp from Chromium - tests required frame and alpha when using the non-blending mode - frames have the following properties: - Frame 0: no alpha, fills screen - Frame 1: alpha, fills screen - Frame 2: no alpha, fills screen - Frame 3: alpha, fills screen, blendBG - Frame 4: no alpha, fills screen, blendBG - Frame 5: alpha, blendBG - Frame 6: covers 4, has alpha, blendBG - also used to test decoding to 565 if the new frame data has alpha but blends onto an opaque frame DM.cpp: - Test animated images to non-native 8888 and unpremul DMSrcSink.cpp: - Do not test non-native 8888 decodes to f16 dst - Test unpremul decodes to f16 - Copy a frame of an animated image prior to drawing, since in unpremul mode, the DM code will premultiply first. Bug: skia: 3315 Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980 Reviewed-on: https://skia-review.googlesource.com/16707 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Matt Sarett <msarett@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 to lcd blending in ganeshGravatar Greg Daniel2017-05-22
| | | | | | | | | | | | This fixes the bug where a src color may originally be opaque but after blending it is no longer opaque. We need to know the opacity after the blend so this restricts us on which blend modes even work this way. Bug: skia: Change-Id: Ib3208887d718e5f25272ed7b0bf44683d04884d7 Reviewed-on: https://skia-review.googlesource.com/17488 Commit-Queue: Greg Daniel <egdaniel@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 kZeroCopy_GrSurfaceFlagGravatar Brian Salomon2017-05-22
| | | | | | | Change-Id: I2869f97a14f3a1363ebfef5d657bd6468fc991f7 Reviewed-on: https://skia-review.googlesource.com/17491 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>