aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpFlushState.h
Commit message (Collapse)AuthorAge
* Refactor GrPipeline dynamic state.Gravatar Brian Salomon2018-06-26
| | | | | | | | | | | | | | | | | Remove scissor rect from GrPipeline. Draws can specify "fixed dynamic state" which doesn't use the dynamism at all or can specify dynamic state arrays with an entry per GrMesh. When we state other than scissor rects this will allow the caller to use a mix of truly dynamic and fixed dynamic state. So a caller that only has dynamic scissor rects doesn't need to store its remaining unvarying state in an array. Change-Id: I8fcc07eb600c72a26cc712b185755c2116021a8a Reviewed-on: https://skia-review.googlesource.com/137223 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add ability to uninstantiate lazy proxies after every flush.Gravatar Greg Daniel2018-03-08
| | | | | | | | | Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove GrRestrictedAtlasManagerGravatar Robert Phillips2018-03-08
| | | | | | | | | Philosophically this relies on: https://skia-review.googlesource.com/c/skia/+/111807 (Revise Text & Small Path Atlas so instantiation failure is handled at flush time) Change-Id: I4fdcf1af8c5e9ffefdfb973104045f4f5d223a4e Reviewed-on: https://skia-review.googlesource.com/112702 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fission GrAtlasGlyphCache in two (take 2)Gravatar Robert Phillips2018-03-01
| | | | | | | | | | | | | | | | | | | | | Reland all the things This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. TBR=jvanverth@google.com Change-Id: I05c6cd8d301bf2decca39765e5cae62993d9da04 Reviewed-on: https://skia-review.googlesource.com/111362 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Fission GrAtlasGlyphCache in two"Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit acf17904d6286f2a63a5d895541804d0ea1be646. Reason for revert: Chrome Original change's description: > Fission GrAtlasGlyphCache in two > > This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. > > The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) > and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation > time and provides access to the proxies backing the atlases. The full GrAtlasManager is > only available at flush time and allows instantiation of the proxies and uploading to them. > > In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the > GrAtlasManager in the main thread. This future atlas manager will have had all of its > GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. > > Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 > Reviewed-on: https://skia-review.googlesource.com/108001 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I7c760ea1a9f041a310b96d552aa1497ee5902cd8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111040 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fission GrAtlasGlyphCache in twoGravatar Robert Phillips2018-02-27
| | | | | | | | | | | | | | | | | | This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 Reviewed-on: https://skia-review.googlesource.com/108001 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Move GrOpFlushState out of GrDrawingManager and onto the stackGravatar Robert Phillips2018-01-18
| | | | | | | Change-Id: If1b3481af7637bfed8a73d75be41c6422319951f Reviewed-on: https://skia-review.googlesource.com/96540 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""Gravatar Brian Salomon2017-11-19
| | | | | | | | | | This reverts commit 9c2202ffc22b4293b48a4edeafa1b5d2bab8bb83. Bug: skia: Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd Reviewed-on: https://skia-review.googlesource.com/73345 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add Atlas Text interface for rendering SDF glyphs."Gravatar Greg Daniel2017-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 39631f3df172feb385527a5d125bc53b0bded7e6. Reason for revert: break google3 rool Original change's description: > Add Atlas Text interface for rendering SDF glyphs. > > This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU > backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The > client issues text draws to potentially multiple targets and then the client flushes. The > client then gets commands from Skia with data to put into a texture atlas and vertices to > draw that reference the texture. The client is responsible for creating the texture, uploading > the SDF data to the texture, and drawing the vertices provided by Skia. > > Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 > Reviewed-on: https://skia-review.googlesource.com/59360 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/73420 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add Atlas Text interface for rendering SDF glyphs.Gravatar Brian Salomon2017-11-17
| | | | | | | | | | | | | | This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The client issues text draws to potentially multiple targets and then the client flushes. The client then gets commands from Skia with data to put into a texture atlas and vertices to draw that reference the texture. The client is responsible for creating the texture, uploading the SDF data to the texture, and drawing the vertices provided by Skia. Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 Reviewed-on: https://skia-review.googlesource.com/59360 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* During flush store GrOp draw and upload records on GrOpFlushState instead of ↵Gravatar Brian Salomon2017-11-02
| | | | | | | | | | on the ops themselves. Bug: skia: Change-Id: Id99267d9e7762829a3f9bebce0e92e7b97a092f8 Reviewed-on: https://skia-review.googlesource.com/66680 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Devirtualized token management in GrDeferredUploadTarget.Gravatar Brian Salomon2017-10-31
| | | | | | | Change-Id: I7bef9d532f19056b5581e24e95949d1d32e8dd95 Reviewed-on: https://skia-review.googlesource.com/65505 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Make deferred upload handling and draw recording be virtual interfaces ↵Gravatar Brian Salomon2017-10-31
| | | | | | | | | | | | implemented by GrOpFlushState. The motivation for this is to allow other clients of GrDrawOpAtlas. Making GrMeshDrawOp::Target also be an abstract interface is somewhat incidental to this goal. Bug: skia: Change-Id: I0987adfa8a269aa2ca94147e933a2827d734c1cc Reviewed-on: https://skia-review.googlesource.com/65121 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove deferred upload types from GrDrawOp.h.Gravatar Brian Salomon2017-10-30
| | | | | | | | | This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops. Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05 Reviewed-on: https://skia-review.googlesource.com/65060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make Copy Ops to go through GpuCommandBuffer instead of straigt to GPU.Gravatar Greg Daniel2017-08-24
| | | | | | | | Bug: skia: Change-Id: I4eae4507e07278997e26419e94586eef0780c423 Reviewed-on: https://skia-review.googlesource.com/38361 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move GrAppliedClip into GrPipelineGravatar Brian Salomon2017-08-10
| | | | | | | Change-Id: I522c2fd52bea9813baba7cdb3f11b63e7ab96b50 Reviewed-on: https://skia-review.googlesource.com/28861 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Move GrProcessorSet into GrPipelineGravatar Brian Salomon2017-08-09
| | | | | | | Change-Id: Ibfa5e1adda3c32140590aa62a31d35654cef79dd Reviewed-on: https://skia-review.googlesource.com/28187 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Store GrRenderTarget in GrGpuCommandBufferGravatar Robert Phillips2017-08-09
| | | | | | | Change-Id: I545d53ffb5f9d450b87a360516b03bdd47232a70 Reviewed-on: https://skia-review.googlesource.com/32460 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)Gravatar Robert Phillips2017-07-26
| | | | | | | | | | | In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Make ShadowRRectOp a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-13
| | | | | | | | | This also removes the ability to have an arbitrary GrPaint with this op and as a consequence simplifies the op and its GrGeometryProcessor. Change-Id: I19cc1c6f73a47e8925fc826291aad42e9423164d Reviewed-on: https://skia-review.googlesource.com/22380 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "Make DashOp a non-legacy GrMeshDrawOp.""Gravatar Brian Salomon2017-07-12
| | | | | | | | | | | This reverts commit beae8a9faa2afcdbeeec96e658db7e113a4fa1c9. Clean revert of revert. Change-Id: Ibb486bf3411ed347b560fc110a2cfbb0e0caa4f2 Reviewed-on: https://skia-review.googlesource.com/22730 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Make DashOp a non-legacy GrMeshDrawOp."Gravatar Brian Salomon2017-07-12
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ebb38256c65f2d799dd64f0274256a0c1deffed1. Reason for revert: Assertions on ANGLE bots Original change's description: > Make DashOp a non-legacy GrMeshDrawOp. > > Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab > Reviewed-on: https://skia-review.googlesource.com/22210 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com Change-Id: I886a0bd75221f05d737d8b27c6b3d8d6cce5573c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/22680 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make DashOp a non-legacy GrMeshDrawOp.Gravatar Brian Salomon2017-07-12
| | | | | | | Change-Id: I84ee3c64a5af8889e9a122cbc08d70ed6b25fbab Reviewed-on: https://skia-review.googlesource.com/22210 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Handle too many (or too large) paths in GrDefaultPathRendererGravatar Brian Osman2017-06-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PathGeoBuilder constructs the geometry with the same basic technique as before, but allows interrupting the process to emit multiple draws. Original test case was 2000 non-AA stroked circles, which created ~66000 vertices. That now renders, as do various tests with a single large path (as well as filled paths). Added a new set of 'AtLeast' allocators for vertex and index data. These take a minimum size and a fallback size. If the minimum size can be satisfied by an existing block, then the caller gets *all* memory in that block, otherwise they get a new block sized for the fallback amount. The previous allocation scheme wasn't a good fit for the new use-case, and because we don't usually need many verts, the flexible approach seems appropriate. TODO: I think that this could be extracted and re-used for MSAA path renderer without too much work? I need to read that code more carefully to make sure it lines up. Re-land of: https://skia-review.googlesource.com/18360 Re-land of: https://skia-review.googlesource.com/18983 Bug: skia:6695 Change-Id: I09ac1273e5af67ed0e3e886de90e2970c3d0b239 Reviewed-on: https://skia-review.googlesource.com/19480 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: 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>
* Revert "Revert "Expand partial render target write pixels workaround.""Gravatar Brian Salomon2017-06-12
| | | | | | | | | | | New version limits the workaround to unorm configs. This reverts commit fdd117025fb846771e9e47cbf825d9071745fa98. Change-Id: I47a08a0ea4cf1acd88ca3c1bf9922cf0a8d215cc Reviewed-on: https://skia-review.googlesource.com/19490 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Expand partial render target write pixels workaround."Gravatar Brian Salomon2017-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0cc507d22566bb7e28e5fe21e4b3fc7b682d86a2. Reason for revert: Causing IntTextureText to fail on bots Original change's description: > Expand partial render target write pixels workaround. > > The workaround is extended in the following ways: > > 1) It now applies to any texture whose base level has *ever* been attached to a FBO. > 2) It applies to Adreno 5xx in addition to Adreno 4xx > 3) It applies in the atlas upload code path. > > This workaround (and a similar one) are narrowed to GLCaps rather than Caps. > > Bug: skia: > Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5 > Reviewed-on: https://skia-review.googlesource.com/18150 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,robertphillips@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Change-Id: I53c8dd7ea7f614da57331470fcc24c6d84aba354 Reviewed-on: https://skia-review.googlesource.com/18229 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Expand partial render target write pixels workaround.Gravatar Brian Salomon2017-05-31
| | | | | | | | | | | | | | | | The workaround is extended in the following ways: 1) It now applies to any texture whose base level has *ever* been attached to a FBO. 2) It applies to Adreno 5xx in addition to Adreno 4xx 3) It applies in the atlas upload code path. This workaround (and a similar one) are narrowed to GLCaps rather than Caps. Bug: skia: Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5 Reviewed-on: https://skia-review.googlesource.com/18150 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Convert DstTexture to DstProxy (take 2)Gravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Reland of: https://skia-review.googlesource.com/c/16908/ (Convert DstTexture to DstProxy) Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I3a497b6a950fad899f23882c0a9552894ef640f8 Reviewed-on: https://skia-review.googlesource.com/17205 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Convert DstTexture to DstProxy"Gravatar Robert Phillips2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 87f7f1c3ce519115141b40f1d8faede437c8f357. Reason for revert: grumble, grumble Original change's description: > Convert DstTexture to DstProxy > > The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed > > Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) > > Change-Id: Ic1435177d8b5d9bd3fc38b4903c9baae8205cfb0 > Reviewed-on: https://skia-review.googlesource.com/16908 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=egdaniel@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I9af52bb222bd2d8cc696250a9efb62afb80edba1 Reviewed-on: https://skia-review.googlesource.com/17203 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Convert DstTexture to DstProxyGravatar Robert Phillips2017-05-17
| | | | | | | | | | | The last GrTexture-based TextureSampler::reset call must be removed before the TextureSamplers can become purely GrTextureProxy-backed Split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: Ic1435177d8b5d9bd3fc38b4903c9baae8205cfb0 Reviewed-on: https://skia-review.googlesource.com/16908 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Add a new non-AA rect op that does not inherit from ↵Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | GrLegacyMeshDrawOp."" This reverts commit 0f353327968530506dd3dd15fca79ef59fe013f1. Bug: skia: Change-Id: I8def56fa55bfc70de4386bf0b7a7867f6e91c173 Reviewed-on: https://skia-review.googlesource.com/15251 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp."Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ff574e0eb79b83c2e797dec8f1661378876202d8. Reason for revert: needs a merge Original change's description: > Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp. > > This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes. > > On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro. > > Bug: skia: > Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80 > Reviewed-on: https://skia-review.googlesource.com/14604 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I2893d6ff7c183a18f7d0ba82818701b80b681eb0 Reviewed-on: https://skia-review.googlesource.com/15280 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp.Gravatar Brian Salomon2017-05-03
| | | | | | | | | | | | This uses a new helper class, GrSimpleMeshDrawOpHelper, which it uses to fullfill the GrMeshDrawOp contract and to construct its GrPipline when flushed. The helper is intended to be used such that the op only stores a GrProcessorSet if it is constructed with a "nontrivial" GrPaint. "Trivial" currently means no fragment processors and src-over blending. The helper allows the op subclass to specify whether it supports stenciling via a template parameter. The helper class is initially intended to be used for ops that don't have per-vertex colors and construct a single GrPipeline at flush time, though perhaps this can be relaxed in future changes. On the microbenchmark "rotated_rects_bw_same_transparent_srcover" this produces a 18-20% reduction in time on my Z840 running Linux and 33% on my 2010 MacPro. Bug: skia: Change-Id: I9f655827a70bee585b0b0e1255371ffd995a0b80 Reviewed-on: https://skia-review.googlesource.com/14604 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Move pipeline handling out of GrMeshDrawOp.Gravatar Brian Salomon2017-04-03
| | | | | | | | | | | The monolithic GrPipeline is moved to a subclass GrLegacyDrawMeshOp. The pipeline used to record a GrMesh draw in a GrMeshDrawOp must now be passed rather than implicitly using the op's pipeline. Change-Id: I50d77e4dcc8d91a523fa7566ce43a9a291174706 Reviewed-on: https://skia-review.googlesource.com/11002 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Revert "Remove GrPipeline from GrDrawOp.""Gravatar Brian Salomon2017-03-21
| | | | | | | | | This reverts commit c48af934608bbb65650641f66adb51f2102d4274. Change-Id: I4ba78fd7e5a7d406b88223ca6f7245c029b60f76 Reviewed-on: https://skia-review.googlesource.com/9981 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Remove GrPipeline from GrDrawOp."Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7. Reason for revert: nanobench assertion Original change's description: > Remove GrPipeline from GrDrawOp. > > GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. > > GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. > > NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. > > The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. > > Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff > Reviewed-on: https://skia-review.googlesource.com/7279 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c Reviewed-on: https://skia-review.googlesource.com/9817 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrPipeline from GrDrawOp.Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff Reviewed-on: https://skia-review.googlesource.com/7279 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Misc batch->op cleanup Part 1 of 2Gravatar Brian Salomon2016-12-21
| | | | | | | Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca Reviewed-on: https://skia-review.googlesource.com/6359 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Rename GrBatchAtlas -> GrDrawOpAtlas.Gravatar Brian Salomon2016-12-17
| | | | | | | Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9 Reviewed-on: https://skia-review.googlesource.com/6165 Commit-Queue: Brian Salomon <brian@thesalomons.net> Reviewed-by: Brian Osman <brianosman@google.com>
* move src/gpu/batches -> src/gpu/opsGravatar Brian Salomon2016-12-16
| | | | | | | Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325 Reviewed-on: https://skia-review.googlesource.com/6163 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Rename GrBatchFlushState to GrOpFlushStateGravatar Brian Salomon2016-12-07
Change-Id: I1a8052c61d7624929caf45ba44e2a465cd0dc1c2 Reviewed-on: https://skia-review.googlesource.com/5649 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>