aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.cpp
Commit message (Collapse)AuthorAge
* Revert "Some scissor state cleanup."Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a219419c9d76432dca74494b611ff1f59086d139. Reason for revert: breaking things Original change's description: > Some scissor state cleanup. > > Separate flushing the enablement of scissor from the rect in GrGLGpu. > > Move GrPipeline::ScissorState to a global enum and use more broadly. > Rename to GrScissorTest to avoid name conflict with existing > GrScissorState. > > Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 > Reviewed-on: https://skia-review.googlesource.com/137395 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/138900 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Some scissor state cleanup.Gravatar Brian Salomon2018-07-02
| | | | | | | | | | | | | Separate flushing the enablement of scissor from the rect in GrGLGpu. Move GrPipeline::ScissorState to a global enum and use more broadly. Rename to GrScissorTest to avoid name conflict with existing GrScissorState. Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 Reviewed-on: https://skia-review.googlesource.com/137395 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* 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>
* Allow GrAppliedClip to have >1 clip coverage FPGravatar Chris Dalton2017-10-31
| | | | | | | | Bug: skia:7190 Change-Id: I07fc689b20968a1b9fe2620bf8a33faacf917823 Reviewed-on: https://skia-review.googlesource.com/65401 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Retract Gr*Priv.h includes a bitGravatar Robert Phillips2017-08-31
| | | | | | | Change-Id: Ic2bfd83b6e6bcc5ea1591427683085637eb5a6cc Reviewed-on: https://skia-review.googlesource.com/41360 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove kDefault_GrSurfaceOriginGravatar Robert Phillips2017-08-30
| | | | | | | Change-Id: Ic55d488287add32e5a32b5a77415e16cebf4c1ee Reviewed-on: https://skia-review.googlesource.com/29120 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove origin field from GrSurface (take 2)Gravatar Robert Phillips2017-08-29
| | | | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. TBR=bsalomon@google.com Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74 Reviewed-on: https://skia-review.googlesource.com/30280 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.Gravatar Brian Salomon2017-08-11
| | | | | | | Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@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>
* Revert "Remove origin field from GrSurface"Gravatar Robert Phillips2017-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > Remove origin field from GrSurface > > This mainly consists of rm origin from GrSurface and the wrapBackEnd* > methods and then re-adding an explicit origin parameter to all the > GrGpu methods that need it. > > Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 > Reviewed-on: https://skia-review.googlesource.com/26363 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* More GrPipeline cleanup.Gravatar Brian Salomon2017-07-31
| | | | | | | | | | | Remove CanCombine and AreEqual (unused) Remove isInitialized() now that pipelines are initialized at creation. Change-Id: Ibacf81d1f879c7ef9ea91a8f471c3d1df3eb2fed Reviewed-on: https://skia-review.googlesource.com/29020 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Initialize GrPipeline at construction.Gravatar Brian Salomon2017-07-31
| | | | | | | | Change-Id: I44bfa3553786ad197acdf807b15155e61d4e5952 Reviewed-on: https://skia-review.googlesource.com/28623 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove origin field from GrSurfaceGravatar Robert Phillips2017-07-31
| | | | | | | | | | | This mainly consists of rm origin from GrSurface and the wrapBackEnd* methods and then re-adding an explicit origin parameter to all the GrGpu methods that need it. Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 Reviewed-on: https://skia-review.googlesource.com/26363 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* 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>
* Remove GrLegacyMeshDrawOp and GrPipelineBuilderGravatar Brian Salomon2017-07-19
| | | | | | | Change-Id: Ib301a0e7d4b4c4f05417d28862017307949748c9 Reviewed-on: https://skia-review.googlesource.com/23584 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Re-enable opList dependency trackingGravatar Robert Phillips2017-06-26
| | | | | | | Change-Id: I0fa1bbaed565a0d7de8d4475ed1d2baf200b285f Reviewed-on: https://skia-review.googlesource.com/20700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Remove GrTGpuResourceRef specializationsGravatar Robert Phillips2017-06-12
| | | | | | | | | This template is only used for GrBuffers now. Change-Id: Ia9e95576b01124657e64007231fbc0a83276e13f Reviewed-on: https://skia-review.googlesource.com/19484 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Introduce dynamic pipeline stateGravatar Chris Dalton2017-06-07
| | | | | | | | | | | | | | Adds a DynamicState struct to GrPipeline that has a field for the scissor rect. Eventually this should become the only way to specify a scissor rectangle and may grow to contain more fields. Adds an array of DynamicStates to GrGpuCommandBuffer::draw and implements support in GL and Vulkan. Bug: skia: Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310 Reviewed-on: https://skia-review.googlesource.com/18510 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove support in GPU backend for distance vector field.Gravatar Brian Salomon2017-06-02
| | | | | | | | | Also, remvoes SkNormalBevelSource as this was the last use case for the distance vector field. Change-Id: Ib0176c78e500e6b5130310934253a75860245812 Reviewed-on: https://skia-review.googlesource.com/18482 Reviewed-by: Greg Daniel <egdaniel@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>
* Revise system for checking for uninstantiated proxiesGravatar Robert Phillips2017-05-29
| | | | | | | | | | | | | | The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 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>
* Remove 'fDrawFace' from GrPipelineGravatar Robert Phillips2017-05-09
| | | | | | | | | This will, hopefully, unblock the roll. Change-Id: I2e33ccca7161334cdecd881e2699ae0c61ba2a31 Reviewed-on: https://skia-review.googlesource.com/16101 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove support for GLs without separate stencil.Gravatar Brian Salomon2017-05-08
| | | | | | | | | | | As a consequence we no longer need GrDrawFace. This effectively raises the minimum bar for non-ES OpenGL to 2.0 as there is no extension that adds the GL 2.0 separate stencil functionality. GL_ATI_separate_stencil is close but it does not have glStencilMaskSeparate. Bug: skia: Change-Id: I36d17a69400c8beeacb6dab8d8c5c3317814cfe4 Reviewed-on: https://skia-review.googlesource.com/15603 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Allow TextureSamplers to have null GrTexture pointerGravatar Robert Phillips2017-05-03
| | | | | | | | | Bug: 715488 Change-Id: I69775cbb50d334d81872e236e59368fe65e698ff Reviewed-on: https://skia-review.googlesource.com/14605 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove srgb flags from GrProcessorSetGravatar Brian Salomon2017-04-28
| | | | | | | | Bug: skia: Change-Id: Icbb1b2f39cac70c9d74603514786d76b46d0afd9 Reviewed-on: https://skia-review.googlesource.com/14603 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Split cleanup changes out of bigger CL (take 2)Gravatar Robert Phillips2017-04-18
| | | | | | | | | | | | | This are split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) This is a reland of: https://skia-review.googlesource.com/c/13585/ (Split cleanup changes out of bigger CL) TBR=bsalomon@google.com Change-Id: Id0d5c764953230412e78ae6aa654f8dfae998c60 Reviewed-on: https://skia-review.googlesource.com/13643 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Remove lastOpList capability from GrSurfaceGravatar Robert Phillips2017-04-17
| | | | | | | | | | | This is split out of: https://skia-review.googlesource.com/c/11581/ (Split up opLists) TBR=bsalomon@google.com Change-Id: I80d589b42918ddd77538484c808b069576691da4 Reviewed-on: https://skia-review.googlesource.com/11793 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move ref counting out of GrProcessor and into subclasses.Gravatar Brian Salomon2017-04-10
| | | | | | | | | | | | | This will allow different subclasses to use different models for lifetime management. GrXferProcessor moves to simple ref counting since they don't own GrGpuResources. This also constifies GrXferProcessor factories. Change-Id: I6bea0ea8de718874063224232f9da50887868b16 Reviewed-on: https://skia-review.googlesource.com/11792 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""Gravatar Brian Salomon2017-04-08
| | | | | | | | | | This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95. Bug: skia: Change-Id: I3db2ec6776eb10c1f863b3992a2c8048c54b130f Reviewed-on: https://skia-review.googlesource.com/12620 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Create GrXferProcessor while doing GrProcessorSet analysis."Gravatar Brian Salomon2017-04-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf. Reason for revert: static assert failure on ios build Original change's description: > Create GrXferProcessor while doing GrProcessorSet analysis. > > > Bug: skia: > Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e > Reviewed-on: https://skia-review.googlesource.com/11482 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ifd57367b0326dd2b53c622705a868e246645d589 Reviewed-on: https://skia-review.googlesource.com/12104 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Create GrXferProcessor while doing GrProcessorSet analysis.Gravatar Brian Salomon2017-04-08
| | | | | | | | Bug: skia: Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e Reviewed-on: https://skia-review.googlesource.com/11482 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use sk_sp with GrXferProcessor and use a static factory to handle the ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | nullptr==srcover case. Bug: skia: Change-Id: I9c07069fc2aae24fc2884c18939e3a649afc27e7 Reviewed-on: https://skia-review.googlesource.com/11282 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move GrPipelineBuilder into GrRenderTargetContext::addLegacyDrawOpGravatar Brian Salomon2017-04-04
| | | | | | | | | This makes the legacy code use GrProcessorSet::Analysis in the same manner as the non-GrLegacyMeshDrawOps which enables changes to how analysis works. Change-Id: I8171e285ac8930beb3ac33cd3c4ee88f217b9e40 Reviewed-on: https://skia-review.googlesource.com/11205 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move the ability to access textures, buffers, and image storages out from ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | | GrProcessor. GrXferProcessor can no longer use this functionality so it is moved to a new intermediate class inherited by GrFragmentProcessor and GrPrimitiveProcessor. Change-Id: I4f30c89bdceb2d77b602bf0646107e0780881c26 Reviewed-on: https://skia-review.googlesource.com/11202 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Store the dst texture used by an XP in GrPipeline rather than in the XP.Gravatar Brian Salomon2017-04-03
| | | | | | | | | This will allow the XP to be created before the dst texture. Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024 Reviewed-on: https://skia-review.googlesource.com/11011 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Make analysis optional to GrPipeline::init().Gravatar Brian Salomon2017-03-29
| | | | | | | | | | | GrXPFactory::createXferProcessor now takes GrPipelineAnalysisColor and GrPipelineAnalysisCoverage rather than GrProcessorSet::FragmentProcessorAnalysis. This will make it so ops do not have to retain the analysis or rerun it to create pipelines at flush time. Change-Id: Ib28ba65de425b20c2647329275f209aec168c3df Reviewed-on: https://skia-review.googlesource.com/10474 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrPipelineOptimizations computation from GrPipeline::init and nest in ↵Gravatar Brian Salomon2017-03-29
| | | | | | | | | GrMeshDrawOp. Change-Id: I4a702c83857606c1cb050294c408922eef5769ea Reviewed-on: https://skia-review.googlesource.com/10414 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove GrXferProcessor::getOptimizations.Gravatar Brian Salomon2017-03-29
| | | | | | | | | | This replaces GrXferProcessor::getOptimizations with a new function on GrXPFactory. The results are made available via FragmentProcessorAnalysis. Bug: skia: Change-Id: I535985458c9d13ad858cac94e957e2fdbe332036 Reviewed-on: https://skia-review.googlesource.com/10218 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Split GrPipelineInput into separate color and coverage types, the latter of ↵Gravatar Brian Salomon2017-03-27
| | | | | | | | | | | | | | | which is just an enum. Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well. Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me. Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together. Change-Id: If93bae74c9d590486eecdf63f302418c96deab65 Reviewed-on: https://skia-review.googlesource.com/10161 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add function to perform color fragment processor elimination while ↵Gravatar Brian Salomon2017-03-24
| | | | | | | | | | | performing FP analysis. Use this in path and instanced ops. Change-Id: I6c2d3fc9b3aaa0220c560c70aa1b85515bd35a6d Reviewed-on: https://skia-review.googlesource.com/10059 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@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>
* Remove origin from GrClipStackClip and GrWindowRectsState.Gravatar Brian Salomon2017-03-13
| | | | | | | Change-Id: I993f426fee0f21cf1f529f58d242de3017253678 Reviewed-on: https://skia-review.googlesource.com/9623 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove XP override color.Gravatar Brian Salomon2017-03-06
| | | | | | | | | | | The only use case for this was using the blend constant for LCD text. Now instead of overriding the op's color with an alpha we upload the alpha as a uniform. This also removes two unused parameters from GrXferProcessor::getOptimizations. Change-Id: I8268da9904a5d26649c6ae81a5705b0930893904 Reviewed-on: https://skia-review.googlesource.com/9221 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Determine whether any fp uses local coords in FragmentProcessorAnalysis ↵Gravatar Brian Salomon2017-03-02
| | | | | | | | | rather than GrPipeline creation Change-Id: I3b6253cd2b0081dfece51125082fd78f647e45e1 Reviewed-on: https://skia-review.googlesource.com/9133 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>