aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetProxy.cpp
Commit message (Collapse)AuthorAge
* 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>
* 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>
* 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>
* 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>
* 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>
* Revert "Implement window rectangles in vulkan"Gravatar Jim Van Verth2017-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94c0468b2b4255e3beed81efdcfbf6d9d39e11e4. Reason for revert: <INSERT REASONING HERE> Original change's description: > Implement window rectangles in vulkan > > Bug: skia: > Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a > Reviewed-on: https://skia-review.googlesource.com/65423 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/67060 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Implement window rectangles in vulkanGravatar Chris Dalton2017-11-02
| | | | | | | | | Bug: skia: Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a Reviewed-on: https://skia-review.googlesource.com/65423 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Fix drawSpecialImageGravatar Robert Phillips2017-10-10
| | | | | | | | | | | | | | W/o this fix the strict constraint on the specialImage draws can sometimes be removed. This CL ensures that the temporary SkImage always has the actual dimensions of the special Image. Note: the replacement of full screen clears w/ draws revealed this bug b.c. the image filters were only drawing a rect for the content area of the special images. Thus when the final DAG result was drawn to the canvas some of the bleed through (from the removal of the strict constraint) was showing. Bug: 755871, 768134 skbug.com/7122 Change-Id: Id67b7143225c24b716e260c973f3bbf68f20188a Reviewed-on: https://skia-review.googlesource.com/57660 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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>
* 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>
* 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>
* Fix -Wshadow-field warningsGravatar Brian Salomon2017-02-28
| | | | | | | | | BUG=skia: Change-Id: I44f1e11787eab88bdc5ed25c34ea802e9001d427 Reviewed-on: https://skia-review.googlesource.com/9083 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Add a deferred copy surface (take 3)Gravatar Robert Phillips2016-12-15
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd Reviewed-on: https://skia-review.googlesource.com/6109 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface (take 2)"Gravatar Robert Phillips2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 398487a850431cf495330d4023607df5305a311f. Reason for revert: See if this is causing the roll failure Original change's description: > Add a deferred copy surface (take 2) > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) > > Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 > Reviewed-on: https://skia-review.googlesource.com/5939 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913 Reviewed-on: https://skia-review.googlesource.com/6024 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surface (take 2)Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface) Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4 Reviewed-on: https://skia-review.googlesource.com/5939 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Add a deferred copy surface"Gravatar Robert Phillips2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). > > There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add a deferred copy surfaceGravatar Robert Phillips2016-12-13
| | | | | | | | | | | | This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext). There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added. Change-Id: Iab1867668d8146a766201158a251b9174438ee2b Reviewed-on: https://skia-review.googlesource.com/5773 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Added GrSurfaceContext and GrTextureContextGravatar Brian Osman2016-11-23
| | | | | | | | | | | | | | | | | This lets copy-to-texture to be treated like copy-to-rt. To match current behavior, though, copies to texture are still executed immediately (forcing a flush). Once MDB is enabled, copies to texture will be deferred. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5093 Change-Id: Icc0ce5435507a5f0a237c22eedef879824952367 Reviewed-on: https://skia-review.googlesource.com/5093 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: 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>
* Move GrRenderTargetPriv::maxWindowRectangles to GrRenderTargetContextPriv & ↵Gravatar Robert Phillips2016-11-09
| | | | | | | | | | | | | GrRenderTargetProxy This removes a reason to call accessRenderTarget on the GrRenderTargetContext GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4583 Change-Id: I6e8a53ffd5c1fea80f542b70e05744e2991f70f8 Reviewed-on: https://skia-review.googlesource.com/4583 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@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>