aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ResourceCacheTest.cpp
Commit message (Collapse)AuthorAge
...
* guard old apis for querying byte-size of a bitmap/imageinfo/pixmapGravatar Mike Reed2017-09-26
| | | | | | | | | | | | | | | Previously we had size_t and uint64_t variations. The new (simpler) API always.. - returns size_t, or 0 if the calculation overflowed - returns the trimmed size (does not include rowBytes padding for the last row) Bug: skia: Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e Reviewed-on: https://skia-review.googlesource.com/50980 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Leon Scroggins <scroggo@google.com>
* Remove pre-attachment of stencil buffersGravatar Robert Phillips2017-09-21
| | | | | | | Change-Id: I4ef555a2b36cf3a0ec74e0ecf7e8ab4f8779df3e Reviewed-on: https://skia-review.googlesource.com/49740 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact ↵Gravatar Greg Daniel2017-09-08
| | | | | | | | | | | | | | | scratch CL This reverts commit 52cb5fe23b8f960bb3248620c8f4e2f2957b6685. This reverts commit e1fbf170580a4b932d0abcb11593fb1ef0cac60b. TBR:bsalomon@googole.com Bug: chromium:763333 Change-Id: Ie94e00c3c7231e32f009b9dc7bb51ebb53baf7b1 Reviewed-on: https://skia-review.googlesource.com/44400 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove isMipMapped from GrSurfaceDescGravatar Greg Daniel2017-09-06
| | | | | | | | Bug: skia: Change-Id: Id3864aad7ff9636362c9c54ef411a02af9c83fbf Reviewed-on: https://skia-review.googlesource.com/42083 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove origin field from GrSurface (take 2)Gravatar Robert Phillips2017-08-29
| | | | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. TBR=bsalomon@google.com Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74 Reviewed-on: https://skia-review.googlesource.com/30280 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Remove origin field from GrSurface"Gravatar Robert Phillips2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > Remove origin field from GrSurface > > This mainly consists of rm origin from GrSurface and the wrapBackEnd* > methods and then re-adding an explicit origin parameter to all the > GrGpu methods that need it. > > Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 > Reviewed-on: https://skia-review.googlesource.com/26363 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove origin field from GrSurfaceGravatar Robert Phillips2017-07-31
| | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add Make[backend] calls for creating GrContextsGravatar Greg Daniel2017-07-25
| | | | | | | | | Docs-Preview: https://skia.org/?cl=26369 Bug: skia: Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550 Reviewed-on: https://skia-review.googlesource.com/26369 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Second small fragment from "Reduce dependence on GrSurface's origin field"Gravatar Robert Phillips2017-07-24
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ifcfe56b1117b64821b2bfc34ba36d120227d15fa Reviewed-on: https://skia-review.googlesource.com/25802 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* don't rely on canvas->readPixelsGravatar Mike Reed2017-07-21
| | | | | | | | Bug: skia:3216 Change-Id: I01a8d0083c79c0fe71fbc4d8cfdde4fa6e48b636 Reviewed-on: https://skia-review.googlesource.com/25741 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Reduce dependence on GrSurface's origin field"Gravatar Robert Phillips2017-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 467022b1861033d968195687da15270c208279ff. Reason for revert: GrAHardwareBufferImageGenerator.cpp Original change's description: > Reduce dependence on GrSurface's origin field > > Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL. > > Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d > Reviewed-on: https://skia-review.googlesource.com/24700 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I1b3f5c3b82d250ac164beb1d5c83abb6c3c6ab3b No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/25620 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reduce dependence on GrSurface's origin fieldGravatar Robert Phillips2017-07-21
| | | | | | | | | Unfortunately, GrGPU and its ilk are still using the GrSurface's origin a lot. I will clean that up in a second CL. Change-Id: Iba729440ce8ea8d24bb7f4e5de55ed576a0f176d Reviewed-on: https://skia-review.googlesource.com/24700 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrBackendTextureDescGravatar Brian Salomon2017-07-20
| | | | | | | Change-Id: I2b123d1782400e97ab2ce2f11e3e3d325a13e6c8 Reviewed-on: https://skia-review.googlesource.com/24748 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update gpu caps for valid sample counts.Gravatar Greg Daniel2017-07-19
| | | | | | | | | | | | Instead of query and maxSampleCount and using that to cap, we now have each config store its supported values and when requested returns either the next highest or equal supported value, or if non the max config supported. Bug: skia: Change-Id: I8802d44c13b3b1703ee54a7e69b82102d4b8dc2d Reviewed-on: https://skia-review.googlesource.com/24302 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Move GrResourceProvider::createMipMappedTexture to ↵Gravatar Robert Phillips2017-07-11
| | | | | | | | | | | | GrSurfaceProxy::MakeDeferredMipMap Although this adds a new method to GrResourceProvider, it is a slight improvement in that it removes some GrProxy stuff from GrResourceProvider (which arguably should only deal in GrSurface-derived classes). Bug: skia: Change-Id: I6d097ed178cd2aa5662770a164135bf2553b80e6 Reviewed-on: https://skia-review.googlesource.com/22023 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move mock gpu and caps, add Gr prefix, and create via GrContext::CreateGravatar Brian Salomon2017-06-23
| | | | | | | Change-Id: I02427839f78372e337ed717b071c6baaa8ba4450 Reviewed-on: https://skia-review.googlesource.com/20622 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* 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>
* 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>
* 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>
* 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>
* 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 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>
* Remove SkCrossContextImageData and all support codeGravatar Brian Osman2017-05-11
| | | | | | | | Bug: skia: Change-Id: I8eb8cef5456c05a8e314d8404698893c7af82d13 Reviewed-on: https://skia-review.googlesource.com/16368 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add flag to avoid stencil buffers in SkiaGravatar Eric Karl2017-05-09
| | | | | | | | | | | | | | | Certain systems experience a leak in the GL driver associated with stencil buffers. Attempts to avoid the leak (while still using stencil buffers) dind't succeed. This patch adds a GrContextOption fAvoidStencilBuffers. This disables certain path rendering modes, as well as stencil based masking/clipping. Bug: 713854 Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b Reviewed-on: https://skia-review.googlesource.com/15253 Commit-Queue: Eric Karl <ericrk@chromium.org> Reviewed-by: Eric Karl <ericrk@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Allow wrapped resources to have unique keysGravatar Brian Osman2017-05-08
| | | | | | | | | | | | | | | Previously, wrapped resources were never budgeted. Now we explicitly allow wrapped, unbudgeted resources with unique keys. This allows code that wraps (and re-wraps) external resources with a deterministic key to find the same wrapped resource - saving time and ensuring a single wrapped copy, to preserve state on the resource (like texture sampler state). Bug: skia: Change-Id: I1dd7642f1ed8bb6c620029d46203cf5cb6b3c160 Reviewed-on: https://skia-review.googlesource.com/15241 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Plumb GrBackendTexture throughout skia.""Gravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7fa5c31c2c9af834bee66d5fcf476e250076c8d6. Reason for revert: Relanding this change now that other fixes have landed. Original change's description: > Revert "Plumb GrBackendTexture throughout skia." > > This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. > > Reason for revert: fix android roll > > Original change's description: > > Plumb GrBackendTexture throughout skia. > > > > Bug: skia: > > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > > Reviewed-on: https://skia-review.googlesource.com/13645 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 > Reviewed-on: https://skia-review.googlesource.com/13773 > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Stan Iliev <stani@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,brianosman@google.com,stani@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I92bc074e4fe37fa5c83186afadc472c03802e8f2 Reviewed-on: https://skia-review.googlesource.com/13975 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Plumb GrBackendTexture throughout skia."Gravatar Stan Iliev2017-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7da62b9059f3c1d31624a0e4da96ee5f908f9c12. Reason for revert: fix android roll Original change's description: > Plumb GrBackendTexture throughout skia. > > Bug: skia: > Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 > Reviewed-on: https://skia-review.googlesource.com/13645 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,stani@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I5cb8763cc837c83ebc6d10366fe2dd3efe35fb89 Reviewed-on: https://skia-review.googlesource.com/13773 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Plumb GrBackendTexture throughout skia.Gravatar Greg Daniel2017-04-18
| | | | | | | | Bug: skia: Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 Reviewed-on: https://skia-review.googlesource.com/13645 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* deprecate odd variants of SkCanvas::readPixelsGravatar Mike Reed2017-04-17
| | | | | | | | | Bug: skia:6513 Change-Id: I51179a85f0912d3f899c368c30a943d346dd1d05 Reviewed-on: https://skia-review.googlesource.com/13589 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv ↵Gravatar Robert Phillips2017-04-06
| | | | | | | | | | | | | (take 3) This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. This is a re-reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) Change-Id: Icfb9dd223418dd460405efd2bfd9d1c356beed1a Reviewed-on: https://skia-review.googlesource.com/11412 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContextPriv (take 2)" This reverts commit aaee31f18c0845417103d84285e365575def3c40. Reason for revert: possible valgrind leak Original change's description: > Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv (take 2) > > This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. > > This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) > > Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148 > Reviewed-on: https://skia-review.googlesource.com/11326 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia0b92bf6402cb5f9607310d356f43bff2e3e75eb Reviewed-on: https://skia-review.googlesource.com/11361 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | (take 2) This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. This is a reland of: https://skia-review.googlesource.com/c/11200/ (Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv) Change-Id: Icd0a90d2beb483dc24ed87c3bace9c817019e148 Reviewed-on: https://skia-review.googlesource.com/11326 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to ↵Gravatar Robert Phillips2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrContextPriv" This reverts commit fb0bd98a43fa11e09705837418167dd72bb4a361. Reason for revert: ANGLE failures Original change's description: > Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv > > This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. > > Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 > Reviewed-on: https://skia-review.googlesource.com/11200 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I7241070dc1f9df47181061e07adab141f9857974 Reviewed-on: https://skia-review.googlesource.com/11324 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPrivGravatar Robert Phillips2017-04-05
| | | | | | | | | This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling. Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0 Reviewed-on: https://skia-review.googlesource.com/11200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Add a new GrResourceCache purging mechanism for purging ↵Gravatar Brian Salomon2017-03-22
| | | | | | | | | | | unused resources."" This reverts commit 20c322ef0cd04cf8e2592879d05d9f4e6cb19596. Change-Id: I6df9a8594484837672308dc2c21c7c29b76ffa2c Reviewed-on: https://skia-review.googlesource.com/10013 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "Add a new GrResourceCache purging mechanism for purging unused ↵Gravatar Brian Salomon2017-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resources." This reverts commit fbb56ce83fc717b7c6722324bbccd1ae73c350a4. Reason for revert: Chrome's ancient libstdc++ doesn't like use of steady_clock Original change's description: > Add a new GrResourceCache purging mechanism for purging unused resources. > > The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged. > > This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it. > > Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d > Reviewed-on: https://skia-review.googlesource.com/8920 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Eric Karl <ericrk@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,ericrk@google.com,reviews@skia.org,ericrk@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3baa3b2e80302315b757d4d625732459e13795d4 Reviewed-on: https://skia-review.googlesource.com/10004 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a new GrResourceCache purging mechanism for purging unused resources.Gravatar Brian Salomon2017-03-22
| | | | | | | | | | | | The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged. This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it. Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d Reviewed-on: https://skia-review.googlesource.com/8920 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Eric Karl <ericrk@google.com>
* Treat cross context images as Ganesh-created resourcesGravatar Brian Osman2017-03-13
| | | | | | | | | | | | | | Always create them budgeted, and register them with the cache (not as wrapped resources). Re-land (with fixes) of: https://skia-review.googlesource.com/9497 BUG=skia: Change-Id: I2df7198adc99efa3eea99fc86b0b2930136f22c7 Reviewed-on: https://skia-review.googlesource.com/9544 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Treat cross context images as Ganesh-created resources"Gravatar Brian Osman2017-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cccda60aca592d2320d79e2871e057778b2688ab. Reason for revert: Android and Windows bot failures. Original change's description: > Treat cross context images as Ganesh-created resources > > Always create them budgeted, and register them with the cache (not as > wrapped resources). > > BUG=skia: > > Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805 > Reviewed-on: https://skia-review.googlesource.com/9497 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ib7bebcad33037dd206c9b06b5cb6c503b00accba Reviewed-on: https://skia-review.googlesource.com/9541 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Treat cross context images as Ganesh-created resourcesGravatar Brian Osman2017-03-10
| | | | | | | | | | | | Always create them budgeted, and register them with the cache (not as wrapped resources). BUG=skia: Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805 Reviewed-on: https://skia-review.googlesource.com/9497 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Rebase and fix chromiumGravatar Brian Osman2017-03-04
| | | | | | | | | | | | | | Combine texture provider and resource provider Largely mechanical. Only three places that were calling createApprox via texture provider (ie without flags), so that was simple. BUG=skia: Change-Id: I876367bcdc6a8db736deedab1028de1972015509 Reviewed-on: https://skia-review.googlesource.com/9176 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Purge clip masks when they are no longer findable.Gravatar Brian Salomon2017-01-06
| | | | | | | | | | | This improves memory usage when the content contains frequently changing clips implemented as masks. BUG=chromium:676459 Change-Id: I06ea5f9fe1cff9564ea136bad9fe97f6ecd77ad9 Reviewed-on: https://skia-review.googlesource.com/6629 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add support for tagging GrUniqueKeys with a debug stringGravatar Brian Salomon2017-01-06
| | | | | | | Change-Id: Ie7d56214fdee7a19a1e8ca3869e5e4d5e72cedf8 Reviewed-on: https://skia-review.googlesource.com/6632 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* remove debugging printf from resource cache test.Gravatar Brian Salomon2017-01-03
| | | | | | | Change-Id: Iec03961810c477d34e763ea4da3149b0788f4efd Reviewed-on: https://skia-review.googlesource.com/6522 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename SkSourceGammaTreatment to SkDestinationSurfaceColorModeGravatar Brian Osman2016-11-09
| | | | | | | | | | | | | | | This is much more explicit about what that type represents (are we in legacy mode or not), which also makes it suitable for other (upcoming) usage. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529 Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf Reviewed-on: https://skia-review.googlesource.com/4529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* src/core: s/SkAutoTUnref/sk_sp/gGravatar Hal Canary2016-11-07
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4492 Change-Id: I753ad01b03e891221965252e3befe280d09cdb9f Reviewed-on: https://skia-review.googlesource.com/4492 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Fix Vulkan command buffer assert on device lostGravatar Jim Van Verth2016-11-07
| | | | | | | | | | | | BUG=skia:5939 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4483 Change-Id: Id363c4d774095b1707adbe6c8ab537c6e5ecab6c Reviewed-on: https://skia-review.googlesource.com/4483 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>