aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrResourceProvider.h
Commit message (Collapse)AuthorAge
* Remove SkAutoTUnref and SkAutoTDelete from public includes.Gravatar bungeman2016-10-27
| | | | | | | | | | | | | | | This also makes the required changed to src, tests, and tools. The few public APIs modified by this change appear to be unused outside of Skia. Removing these from the public API makes it easier to ensure users are no longer using them. This also updates GrGpu::wrapBackendXXX and the ::onWrapBackendXXX methods to clarify ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002 Review-Url: https://codereview.chromium.org/2448593002
* Add GrOpList and rename GrDrawTarget to GrRenderTargetOpListGravatar Robert Phillips2016-10-26
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910 Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1 Reviewed-on: https://skia-review.googlesource.com/3910 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Support inline uploads in VulkanGravatar Greg Daniel2016-10-19
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3586 Change-Id: I5913c336aa33851d6d2e80d9638df2efa8ac0400 Reviewed-on: https://skia-review.googlesource.com/3586 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add resource provider flag to avoid client-side buffersGravatar csmartdalton2016-07-13
| | | | | | | | | | | | | | | On some platforms, a newly-created buffer was liable to be CPU backed. This would break code that expected a VBO (aka instanced rendering). This change adds an optional flag to GrResourceProvider that requires a buffer to be created in GPU memory. It also moves the CPU backing logic into Gr land in order to properly cache real VBOs on platforms that prefer client-side buffers. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143333002 Review-Url: https://codereview.chromium.org/2143333002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002
* Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of ↵Gravatar bsalomon2016-05-10
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1957363002/ ) Reason for revert: Breaking some bots Original issue's description: > Replace GrStrokeInfo with GrStyle. > > A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 > > Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f TBR=egdaniel@google.com,robertphillips@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1967513002
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Review-Url: https://codereview.chromium.org/1957363002
* Add optional data parameter to createBufferGravatar cdalton2016-04-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1877073002 Review URL: https://codereview.chromium.org/1877073002
* Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 ↵Gravatar reed2016-04-12
| | | | | | | | | | | | | | of https://codereview.chromium.org/1863013003/ )" add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome this has now landed https://codereview.chromium.org/1878913002/ TBR= BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880873002 Review URL: https://codereview.chromium.org/1880873002
* Revert of Pass effects directly to fontcache (patchset #8 id:140001 of ↵Gravatar borenet2016-04-11
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1863013003/ ) Reason for revert: Seems to have broken the DEPS roll. Original issue's description: > Pass effects directly to fontcache > > BUG=skia:5176 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 > > Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2 TBR=djsollen@google.com,bungeman@google.com,mtklein@google.com,fmalita@chromium.org,msarett@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5176 Review URL: https://codereview.chromium.org/1872253004
* Pass effects directly to fontcacheGravatar reed2016-04-11
| | | | | | | BUG=skia:5176 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 Review URL: https://codereview.chromium.org/1863013003
* Track GL buffer state based on unique resource IDGravatar cdalton2016-04-07
| | | | | | | | | | | | | | | | | | Reworks GrGLGpu to track GL buffer state based on the unique GrGpuResource ID. This eliminates the need to notify the gpu object whenever a buffer is deleted. This change also allows us to remove the type specifier from GrBuffer. At this point a buffer is just a chunk of memory, and the type given at creation time is just a suggestion to the GL backend about which target to bind to for updates. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5 Review URL: https://codereview.chromium.org/1854283004
* Revert of Track GL buffer state based on unique resource ID (patchset #6 ↵Gravatar mtklein2016-04-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/1854283004/ ) Reason for revert: Chrome roll's broken, seems to be missing fTarget: https://codereview.chromium.org/1861473005 Original issue's description: > Track GL buffer state based on unique resource ID > > Reworks GrGLGpu to track GL buffer state based on the unique > GrGpuResource ID. This eliminates the need to notify the gpu object > whenever a buffer is deleted. > > This change also allows us to remove the type specifier from GrBuffer. > At this point a buffer is just a chunk of memory, and the type > given at creation time is just a suggestion to the GL backend about > which target to bind to for updates. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 > > Committed: https://skia.googlesource.com/skia/+/deacc97bc63513b5eacaf21f858727f6e8b98ce5 TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1870553002
* Track GL buffer state based on unique resource IDGravatar cdalton2016-04-06
| | | | | | | | | | | | | | | | Reworks GrGLGpu to track GL buffer state based on the unique GrGpuResource ID. This eliminates the need to notify the gpu object whenever a buffer is deleted. This change also allows us to remove the type specifier from GrBuffer. At this point a buffer is just a chunk of memory, and the type given at creation time is just a suggestion to the GL backend about which target to bind to for updates. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854283004 Review URL: https://codereview.chromium.org/1854283004
* Remove ownership parameter from ↵Gravatar kkinnunen2016-04-01
| | | | | | | | | | | | | | | GrResourceProvider::wrapBackendTextureAsRenderTarget Remove ownership parameter from GrResourceProvider::wrapBackendTextureAsRenderTarget. The function leaks the texture id if kAdopt_LifeCycle is passed. There is no public API to access the parameter. BUG=594928 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842313003 Review URL: https://codereview.chromium.org/1842313003
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f Review URL: https://codereview.chromium.org/1825393002
* Revert of Consolidate GPU buffer implementations (patchset #10 id:180001 of ↵Gravatar robertphillips2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1825393002/ ) Reason for revert: Lots of Android redness Original issue's description: > Consolidate GPU buffer implementations > > Consolidates all the different buffer implementations into a single > GrBuffer class. This will allow us to add new buffer types, use DSA in > OpenGL, track buffer bindings by unique ID, cache buffers without > respect to the type of data they have been used for previously, etc. > This change is strictly a refactor; it introduces no change in > functionality. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 > > Committed: https://skia.googlesource.com/skia/+/8b1bff29675afd25843439eade634a57f68fe16f TBR=bsalomon@google.com,egdaniel@google.com,jvanverth@google.com,cdalton@nvidia.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1831133004
* Consolidate GPU buffer implementationsGravatar cdalton2016-03-25
| | | | | | | | | | | | | | Consolidates all the different buffer implementations into a single GrBuffer class. This will allow us to add new buffer types, use DSA in OpenGL, track buffer bindings by unique ID, cache buffers without respect to the type of data they have been used for previously, etc. This change is strictly a refactor; it introduces no change in functionality. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825393002 Review URL: https://codereview.chromium.org/1825393002
* Add wrapBackendTextureAsRenderTarget APIGravatar ericrk2016-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skia's GrTextureProvider currently exposes two APIs for wrapping backend objects: * wrapBackendTexture - wraps a texture into a GrTexture. Depending on flags, this GrTexture can be converted to a GrRenderTarget. Skia manages the render target objects it may create to provide a render target for the texture. This allows Skia to create stencil buffers if needed and manager MSAA resolves. * wrapBackendRenderTarget - wraps a FBO into a GrRenderTarget. This object cannot be converted to a GrTexture. Skia does not manage the render target objects for such a GrRenderTarget, and as such cannot attach stencil buffers or perform MSAA resolves on the created GrRenderTarget. Given these two options, wrapBackendTexture provides more versatility and allows Skia more room for optimization. Chrome currently uses wrapBackendTexture for this reason. While these two functions cover most cases, they do not provide a way for Skia to wrap a texture into a render target (and gain the MSAA and stencil buffer management), without also creating a GrTexture. This is problematic in cases where a texture can be bound to a render target, but cannot be textured from, as is the case in Chrome's limited support for GL_TEXTURE_RECTANGLE. To address this, a new function is created: * wrapBackendTextureAsRenderTarget - wraps a texture into a GrRenderTarget. As with wrapBackendTexture, the created render target objects are fully managed by Skia. Unlike wrapBackendTexture no GrTexture is created, and the created object will never be textured from. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709163003 Review URL: https://codereview.chromium.org/1709163003
* Reland of Add guards to GrTextureProvider (patchset #1 id:1 of ↵Gravatar joshualitt2016-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1565313003/ ) Reason for revert: should be fixed Original issue's description: > Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ ) > > Reason for revert: > breaking asan bot > > Original issue's description: > > Add guards to GrTextureProvider > > > > TBR=bsalomon@google.com > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002 > > > > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c > > TBR=robertphillips@google.com,joshualitt@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/9a9515e081c54efdd5a0b0 f662c013cbeef6d63f TBR=bsalomon@google.com TBR=robertphillips@google.com,joshualitt@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia: Review URL: https://codereview.chromium.org/1575093002
* Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of ↵Gravatar joshualitt2016-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1567983002/ ) Reason for revert: breaking asan bot Original issue's description: > Add guards to GrTextureProvider > > TBR=bsalomon@google.com > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002 > > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c TBR=robertphillips@google.com,joshualitt@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1565313003
* Add guards to GrTextureProviderGravatar joshualitt2016-01-07
| | | | | | | | TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002 Review URL: https://codereview.chromium.org/1567983002
* More framework support for TransferBuffersGravatar jvanverth2016-01-05
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534123003 Review URL: https://codereview.chromium.org/1534123003
* Comments Style: s/skbug.com/bug.skia.org/Gravatar halcanary2015-11-07
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1432503003 Review URL: https://codereview.chromium.org/1432503003
* Remove separate cache for clip mask texturesGravatar bsalomon2015-10-02
| | | | Review URL: https://codereview.chromium.org/1377943003
* Move some of the adding stencil attachment logic of Gpu and into Render Target.Gravatar egdaniel2015-09-14
| | | | | | | | | | | | | | The new flow of calls for attaching a Stencil looks like: Client rt->attachStencilAttachment() gpu->getStencilAttachment() glgpu->createStencilAttachment() glrt->completeStencilAttachment() //actually attaches BUG=skia: Review URL: https://codereview.chromium.org/1333383002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Move atlas creation to internal to GrResourceProviderGravatar joshualitt2015-08-05
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1260183006
* Some cleanup in GrTextureProvider and GrResourceProvider.Gravatar bsalomon2015-07-31
| | | | Review URL: https://codereview.chromium.org/1261643004
* Refactor GrBufferAllocPools to use resource cacheGravatar robertphillips2015-06-24
| | | | | | Committed: https://skia.googlesource.com/skia/+/e935f1a0e2351373c33600b8388492ce1218014a Review URL: https://codereview.chromium.org/1139753002
* Revert of Refactor GrBufferAllocPools to use resource cache (patchset #15 ↵Gravatar robertphillips2015-06-23
| | | | | | | | | | | | | | | | | | | id:280001 of https://codereview.chromium.org/1139753002/) Reason for revert: Will reland after Chromium branch Original issue's description: > Refactor GrBufferAllocPools to use resource cache > > Committed: https://skia.googlesource.com/skia/+/e935f1a0e2351373c33600b8388492ce1218014a TBR=bsalomon@google.com,joshualitt@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1204773003
* Refactor GrBufferAllocPools to use resource cacheGravatar robertphillips2015-06-23
| | | | Review URL: https://codereview.chromium.org/1139753002
* Remove GrContext from GrClipMaskCacheGravatar bsalomon2015-05-29
| | | | Review URL: https://codereview.chromium.org/1144013007
* Move GrPath(Range) creation to ResourceProvider.Gravatar bsalomon2015-05-22
| | | | Review URL: https://codereview.chromium.org/1155593002
* Revert of Refactor GrBufferAllocPools to use resource cache (patchset #9 ↵Gravatar robertphillips2015-05-14
| | | | | | | | | | | | | | | | | | | id:160001 of https://codereview.chromium.org/1139753002/) Reason for revert: Perf Regression for some bot/skp combinations Original issue's description: > Refactor GrBufferAllocPools to use resource cache > > Committed: https://skia.googlesource.com/skia/+/c5f1c5414fc8f73cbefadcc1b24ec794056fa203 TBR=bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1129863008
* Refactor GrBufferAllocPools to use resource cacheGravatar robertphillips2015-05-13
| | | | Review URL: https://codereview.chromium.org/1139753002
* Move instanced index buffer creation to flush timeGravatar bsalomon2015-05-04
| | | | | | Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26 Review URL: https://codereview.chromium.org/1116943004
* Revert of Move instanced index buffer creation to flush time (patchset #6 ↵Gravatar bsalomon2015-05-04
| | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/1116943004/) Reason for revert: messed up caching, recreating index buffers all the time. Original issue's description: > Move instanced index buffer creation to flush time > > Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26 TBR=joshualitt@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1126613003
* Move instanced index buffer creation to flush timeGravatar bsalomon2015-05-04
| | | | Review URL: https://codereview.chromium.org/1116943004
* This replaces the texture creation/caching functions on GrContext with a ↵Gravatar bsalomon2015-04-30
GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types. Review URL: https://codereview.chromium.org/1107973004