aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureRenderTargetProxy.cpp
Commit message (Collapse)AuthorAge
* Make GrTextureProxy store a GrTextureType.Gravatar Brian Salomon2018-07-30
| | | | | | | | | | Removes flag indicating rectangle or external as its now redundant. Bug: skia: Change-Id: Ia475b557390e7a6b0f19f6e189cf8c27090e397c Reviewed-on: https://skia-review.googlesource.com/144346 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets ↵Gravatar Greg Daniel2018-04-26
| | | | | | | | | | use GL FBO 0. Bug: skia:7748 Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0 Reviewed-on: https://skia-review.googlesource.com/124048 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update flag checks when validating surface being assigned to proxy.Gravatar Greg Daniel2018-04-24
| | | | | | | | Bug: skia:7748 Change-Id: Id87c0b1be2efbdefd96740e9591fd102e09b4d95 Reviewed-on: https://skia-review.googlesource.com/123423 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy ↵Gravatar Robert Phillips2018-03-19
| | | | | | | | | | | | | | | | -specific flags This CL: moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags (i.e., isExternal & isRectangle) can be stored. Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511 Reviewed-on: https://skia-review.googlesource.com/114796 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Initial texture data is never flipped when uploaded.Gravatar Brian Salomon2018-03-07
| | | | | | | | | The first bytes of the data always refer to the pixel accessed by texture coord (0, 0). Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a Reviewed-on: https://skia-review.googlesource.com/112261 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrSurfaceOrigin from GrSurfaceDesc.Gravatar Brian Salomon2018-03-05
| | | | | | | | | | | | This field has no interpretation at the GrTexture/GrGpu as the orientation is handled at the GrSurfaceProxy level. This change requires GrGpu to accept a GrSurfaceOrigin when creating a texture with initial data. The origin refers to the texel data to be uploaded. Longer term the plan is to remove this and require the data to be kTopLeft. Additionally, kBottomLeft will only be allowed for wrapped texture/RTs as this evolves. Change-Id: I7d25b0199aafd9bf3b74c39b2cae451acadcd772 Reviewed-on: https://skia-review.googlesource.com/111806 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Update createWrappedRenderTargetProxy with BackendRT to work with lazy proxies.Gravatar Greg Daniel2018-02-20
| | | | | | | | | | | | This change also triggered a bunch of side changes thanks to WrappedProxyTest fixing/improving how we handle wrapped proxies in genernal. Bug: skia: Change-Id: I743a458923cff1c2e947627d0e9154a4c808a668 Reviewed-on: https://skia-review.googlesource.com/108102 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* When creating emptyp MipMap proxies, don't instantiate them immediately. ↵Gravatar Greg Daniel2018-02-15
| | | | | | | | | | | | Attempt 3 original: https://skia-review.googlesource.com/106966 Bug: skia: Change-Id: I779985cef2d3c4f36a0129d8ecedd12e510bec7e Reviewed-on: https://skia-review.googlesource.com/107781 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "When creating emptyp MipMap proxies, don't ↵Gravatar Greg Daniel2018-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instantiate them immediately.""" This reverts commit 95edb43251e8fcef4286c91d334c3259940a0095. Reason for revert: breaking Ubuntu Linux GMs Original change's description: > Revert "Revert "When creating emptyp MipMap proxies, don't instantiate them immediately."" > > This reverts commit 0ee866dac78b60497b4c107995d3c2747309ef8b. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Revert "When creating emptyp MipMap proxies, don't instantiate them immediately." > > > > This reverts commit 8242c5c199f5d04e4209222b265f9e27f7c55fa7. > > > > Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey > > > > Original change's description: > > > When creating emptyp MipMap proxies, don't instantiate them immediately. > > > > > > This chnages makes it match how we handle non mipped proxies where we > > > don't actually instantiate them until we need to. > > > > > > Bug: skia: > > > Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279 > > > Reviewed-on: https://skia-review.googlesource.com/106966 > > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > > > TBR=egdaniel@google.com,robertphillips@google.com > > > > Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: skia: > > Reviewed-on: https://skia-review.googlesource.com/107263 > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,robertphillips@google.com > > Bug: skia: > Change-Id: Ice34283f9ac183faed6e061d8162cf2226b18289 > Reviewed-on: https://skia-review.googlesource.com/107320 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I53f166d508cc8ccd71e7473934a12a52f2eba7bb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/107321 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "Revert "When creating emptyp MipMap proxies, don't instantiate them ↵Gravatar Greg Daniel2018-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | immediately."" This reverts commit 0ee866dac78b60497b4c107995d3c2747309ef8b. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "When creating emptyp MipMap proxies, don't instantiate them immediately." > > This reverts commit 8242c5c199f5d04e4209222b265f9e27f7c55fa7. > > Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey > > Original change's description: > > When creating emptyp MipMap proxies, don't instantiate them immediately. > > > > This chnages makes it match how we handle non mipped proxies where we > > don't actually instantiate them until we need to. > > > > Bug: skia: > > Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279 > > Reviewed-on: https://skia-review.googlesource.com/106966 > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > TBR=egdaniel@google.com,robertphillips@google.com > > Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/107263 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,robertphillips@google.com Bug: skia: Change-Id: Ice34283f9ac183faed6e061d8162cf2226b18289 Reviewed-on: https://skia-review.googlesource.com/107320 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Revert "When creating emptyp MipMap proxies, don't instantiate them ↵Gravatar Greg Daniel2018-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | immediately." This reverts commit 8242c5c199f5d04e4209222b265f9e27f7c55fa7. Reason for revert: Hitting assert on intel bots on skbug6850overlay2.skp, SkASSERT(proxy->getUniqueKey().isValid()); in processInvalidProxyUniqueKey Original change's description: > When creating emptyp MipMap proxies, don't instantiate them immediately. > > This chnages makes it match how we handle non mipped proxies where we > don't actually instantiate them until we need to. > > Bug: skia: > Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279 > Reviewed-on: https://skia-review.googlesource.com/106966 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com Change-Id: I1fa6165b69c5bbb1d6bb10abba33dcdb55a27ba3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/107263 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* When creating emptyp MipMap proxies, don't instantiate them immediately.Gravatar Greg Daniel2018-02-14
| | | | | | | | | | | This chnages makes it match how we handle non mipped proxies where we don't actually instantiate them until we need to. Bug: skia: Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279 Reviewed-on: https://skia-review.googlesource.com/106966 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove tracking of SkDestinationSurfaceColorMode on GrTextureProxy for mipsGravatar Greg Daniel2018-02-12
| | | | | | | | | | | | When we create a new surface from a proxy we were always using legacy and when we wrapped an existing surface we never actaully had to use the value we pulled off of it since the proxy was already instantiatied. Bug: skia: Change-Id: Ifcb5f3ac2f1dcf41b01a98c554d682ae57028d5a Reviewed-on: https://skia-review.googlesource.com/106207 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* When querying mipmapped on proxies return targets state if possibleGravatar Greg Daniel2018-02-09
| | | | | | | | | | | | | | | | | | In the non-ddl world where we are still using lazy proxies, we may create those proxies with no mipmaps, but when we instantiate them immediately we end up getting a surface with mips. This allows future queries on that proxy to take advatage of the fact that we actaully have mips. For lazy ddl proxies, this makes it work in a world where we may decide to uninstantiate the proxies and we continue to track the request mip level as well as the actually one from instantiation. Bug: skia: Change-Id: I4824e74d5e2a2fdf860709c85469aa8cf74632d5 Reviewed-on: https://skia-review.googlesource.com/106121 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make non-ddl lazy proxys clean-up and delete their callbacks immediately ↵Gravatar Greg Daniel2018-02-08
| | | | | | | | | | | | | after instanstation. This makes sure resources are released and free'd as soon as possible if we no longer need them. Bug: skia: Change-Id: Ic216987649c54183f8cbbff90a633860a97754b3 Reviewed-on: https://skia-review.googlesource.com/105721 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move control of explicit GPU resource allocation to GrContextOptionsGravatar Robert Phillips2018-02-08
| | | | | | | | Change-Id: Ic284acc79bab5936f0007d5ae5fb1e7a9929e2af Reviewed-on: https://skia-review.googlesource.com/104880 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Update LazyProxy creation to allow for a non-textureable resultGravatar Robert Phillips2018-02-04
| | | | | | | Change-Id: Ic284b4f4220afa714159e07f57798a94fd40d63a Reviewed-on: https://skia-review.googlesource.com/102484 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | sample counts in GPU backend."""""" This reverts commit 3a2cc2c2ec124de36d2544b2a523ef1dd317ca32. Fix code with samplecnt=0 that slipped in between trybots/CQ and landing of previous version Change-Id: Iab19f2e8d1e9901601c8c76244d7a88c5d707fab Reviewed-on: https://skia-review.googlesource.com/103181 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample ↵Gravatar Brian Salomon2018-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | counts in GPU backend.""""" This reverts commit 5bb82cbecd740d21b92e8d2944280ab6eb6af7a6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""" > > This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. > > Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" > > > Bug: skia: > Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 > Reviewed-on: https://skia-review.googlesource.com/102940 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Idee23be2f1719f0bdc9305043e95a2d589bee8d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/103220 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU ↵Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | backend."""" This reverts commit 18c52a7b52211de5d0dcd86dc048adef758c6c75. Also relands "More sample count cleanup:" and "Add new GrContext queries for imagability, surfacability, and max sample count of color types" Bug: skia: Change-Id: I4028105a3a1f16ce3944e134619eb6245af6b947 Reviewed-on: https://skia-review.googlesource.com/102940 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""Gravatar Brian Salomon2018-02-02
| | | | | | | | | | | | | | | | | | | | This reverts commit d0d7270fcc32546005b8e847df516cb11592cd30. Revert "More sample count cleanup:" This reverts commit d653cac70ed17983125ceed053138c09f1401846. Revert "Add new GrContext queries for imagability, surfacability, and max sample count of color types" This reverts commit 85ae7159c9c8a9186a4c7e74304eabb35bca9a79. Need to understand NVPR perf changes before relanding Change-Id: I0db075fb42438ef2a1f9885df184dce52892ac4b Reviewed-on: https://skia-review.googlesource.com/102780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Redefine the meaning of sample counts in GPU backend.""Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | Fixes gpu config default samples to be 1 and updates config parsing test accordingly. This reverts commit c1ce2f7966babaae0deb150f93f1227ee5af9285. Bug: skia: Change-Id: I456973b1f52ced85a2011ea10fc49449bfc5846f Reviewed-on: https://skia-review.googlesource.com/102147 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Redefine the meaning of sample counts in GPU backend."Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 48825b11ad25c98b9a4884d5cc0edd4e290c4409. Reason for revert: nanobench Original change's description: > Redefine the meaning of sample counts in GPU backend. > > Old: 0 -> nonMSAA > 1+ -> MSAA > > New: > 0 -> error/unsupported > 1 -> nonMSAA > 2+ -> MSAA > > We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: > > 1) SkSurface factories > 2) GrBackendRenderTarget constructors > 3) GrCaps::getSampleCnt()'s requestedCount parameter > > However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. > > This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. > > > Bug: skia: > Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 > Reviewed-on: https://skia-review.googlesource.com/101560 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: Ic257619a8a5ee9ac15419ecf10259e42daed7f82 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/102662 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Redefine the meaning of sample counts in GPU backend.Gravatar Brian Salomon2018-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | Old: 0 -> nonMSAA 1+ -> MSAA New: 0 -> error/unsupported 1 -> nonMSAA 2+ -> MSAA We still allow 0 to mean nonMSAA in three sets of public APIs for backwards compatibility: 1) SkSurface factories 2) GrBackendRenderTarget constructors 3) GrCaps::getSampleCnt()'s requestedCount parameter However, we immediately clamp to 1 and treat 0 as invalid/non-renderable internally. This also changes the behavior when using a large sample count. We now fail in that case rather than using the largest sample available sample count. GrCaps::getSampleCount() will return 0 in this case. Bug: skia: Change-Id: Ida22c6b22c1365e563c9046b611e88bf5eb3ff33 Reviewed-on: https://skia-review.googlesource.com/101560 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Have lazy proxies keep their callbacks around and clean up their lambdas in ↵Gravatar Greg Daniel2018-02-01
| | | | | | | | | | | | | the dtor I believe after this CL we will be at a place where we just have to null out the fTarget of a lazy proxy and it will reinstantiate itself. Bug: skia: Change-Id: I88fdc70e149eba4514a0823da99383583394005c Reviewed-on: https://skia-review.googlesource.com/102021 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Updating lazy proxys to support the case where we know a lot more info about ↵Gravatar Greg Daniel2018-01-12
| | | | | | | | | | | | the texture. This is needed for future DDL texture work. Bug: skia: Change-Id: I07e0b9c67509e63b9cac00adc355254d03784df8 Reviewed-on: https://skia-review.googlesource.com/91500 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Add "lazy" texture proxiesGravatar Chris Dalton2017-11-30
| | | | | | | | | | | Adds ultra-deferred proxies that are instantiated by a user-supplied callback during flush. Bug: skia:7190 Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc Reviewed-on: https://skia-review.googlesource.com/76461 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Respect if texture proxy will have mips or not when computing sizeGravatar Greg Daniel2017-10-24
| | | | | | | | Bug: skia: Change-Id: I47239ae68c103f29a8c8c2a2a5d8940c2c1d95fc Reviewed-on: https://skia-review.googlesource.com/63001 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add hint to SkSurface::MakeRenderTarget that we will use mipsGravatar Greg Daniel2017-10-23
| | | | | | | | | | | Additionally this changed triggered a cascade of plumbing GrMipMapped down throughout Ganesh. Bug: skia: Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb Reviewed-on: https://skia-review.googlesource.com/63000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add native caching of uniquely keyed GrTextureProxies (take 2)Gravatar Robert Phillips2017-09-21
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141 Reviewed-on: https://skia-review.googlesource.com/49543 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add native caching of uniquely keyed GrTextureProxies"Gravatar Robert Phillips2017-09-20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4f100dad90ed5beb1b614464d8c4fcb22c0a993. Reason for revert: ASAN Original change's description: > Add native caching of uniquely keyed GrTextureProxies > > Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d > Reviewed-on: https://skia-review.googlesource.com/48300 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/49442 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add native caching of uniquely keyed GrTextureProxiesGravatar Robert Phillips2017-09-20
| | | | | | | Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d Reviewed-on: https://skia-review.googlesource.com/48300 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove accessRenderTarget calls in service of binding stencil bufferGravatar Robert Phillips2017-08-10
| | | | | | | Change-Id: Ifca6e21c619a0433ecf0b8699d92661f8c3068a8 Reviewed-on: https://skia-review.googlesource.com/31243 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reduce dependence on GrSurface's origin field (take 3)Gravatar Robert Phillips2017-07-25
| | | | | | | | | TBR=bsalomon@google.com Change-Id: I8c95c6774897dbd87e3c5c87d92f75c5b64d4e76 Reviewed-on: https://skia-review.googlesource.com/26424 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Reduce dependence on GrSurface's origin field (take 2)"Gravatar Robert Phillips2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 22115b4fc6ab169d45a1cfb65dae2dc7e544c80a. Reason for revert: GrAHardwareBufferImageGenerator.cpp Original change's description: > Reduce dependence on GrSurface's origin field (take 2) > > TBR=bsalomon@google.com > Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71 > Reviewed-on: https://skia-review.googlesource.com/25800 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I6dc77f02eed3073317128c48f0b426b81926787f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/26480 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Reduce dependence on GrSurface's origin field (take 2)Gravatar Robert Phillips2017-07-25
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71 Reviewed-on: https://skia-review.googlesource.com/25800 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* Add GrResourceAllocator class + unit testGravatar Robert Phillips2017-07-19
| | | | | | | Change-Id: I2700e8cb4213479b680519ba67f078cc3fb71376 Reviewed-on: https://skia-review.googlesource.com/23661 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Move Flags from GrRenderTarget to GrTypesPriv.h & renameGravatar Robert Phillips2017-06-13
| | | | | | | | | The motivation for this is to prevent GrRenderTarget.h appearing in GrRenderTargetProxy.h Change-Id: I4ef126972c0780cbacb35fa2aa6290777c66eddf Reviewed-on: https://skia-review.googlesource.com/19521 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* 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>
* Move MIP color mode from GrSurfaceProxy to GrTextureProxyGravatar Brian Salomon2017-05-18
| | | | | | | Change-Id: I76bc7f551ea4052fc611cf01e0ce81102c9c3395 Reviewed-on: https://skia-review.googlesource.com/17263 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrSurfaceDesc member from GrSurfaceProxy.Gravatar Brian Salomon2017-05-17
| | | | | | | | | Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy. Change-Id: Iee058674dce49107a991cca9d083cd33e3572809 Reviewed-on: https://skia-review.googlesource.com/17209 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)Gravatar Robert Phillips2017-02-28
| | | | | | | | | | | | | | | | | In some instances proxies must be created that, when instantiated, have no pending IO. This is split out of: https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager) and is a reland of: https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating) Change-Id: I36f52a6d249e762bdfc1f0d7528aba6d4071e492 Reviewed-on: https://skia-review.googlesource.com/9070 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"Gravatar Robert Phillips2017-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c8f1e3a5c08d58657dddccdeedbe5d6e8c16d891. Reason for revert: check on ANGLE failure Original change's description: > Allow GrSurfaceProxy-derived classes to use flags when instantiating > > In some instances proxies must be created that, when instantiated, have no pending IO. > > This is split out of: (Add per-Flush callback to GrDrawingManager) > > https://skia-review.googlesource.com/c/8679/ > > Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826 > Reviewed-on: https://skia-review.googlesource.com/8988 > 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: I157417c443028b2148ee355ce69c946a96bb9407 Reviewed-on: https://skia-review.googlesource.com/9066 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Allow GrSurfaceProxy-derived classes to use flags when instantiatingGravatar Robert Phillips2017-02-28
| | | | | | | | | | | | | In some instances proxies must be created that, when instantiated, have no pending IO. This is split out of: (Add per-Flush callback to GrDrawingManager) https://skia-review.googlesource.com/c/8679/ Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826 Reviewed-on: https://skia-review.googlesource.com/8988 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix computation of texture size for approximately-fit deferred proxiesGravatar Robert Phillips2016-11-17
| | | | | | | | | | | For approximate-fit deferred proxies asserts were firing when the instantiated size was larger than the pre-computed exact-fit size. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4972 Change-Id: I879e16b86ab4d9ef9834163c24ccd6507fe4b94a Reviewed-on: https://skia-review.googlesource.com/4972 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Consolidate GrSurfaceProxy Make methodsGravatar Robert Phillips2016-11-09
| | | | | | | | | | | I think GrSurfaceDesc is still the most compact way to communicate the deferred GrSurface's settings to the Proxy but this CL, at least, reduces where it is used. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4559 Change-Id: Ica599c28a5aef1ed4094f47a4ac119e2d204d652 Reviewed-on: https://skia-review.googlesource.com/4559 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add GrTextureRenderTargetProxy and support switching between RT & Tex ProxiesGravatar Robert Phillips2016-11-07
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4427 Change-Id: Ie7662299953592f564bb27a4df4ea101f743403e Reviewed-on: https://skia-review.googlesource.com/4427 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>