aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorSet.h
Commit message (Collapse)AuthorAge
* Remove clamping of kPlus with F16 configsGravatar Brian Osman2018-07-11
| | | | | | | | | | | | | | | | | The most common use-case for F16 is to draw things that are explicitly outside of [0,1]. We can't prevent out-of-range values in general, users could just draw out-of-range content in src mode. We've decided that it's best to avoid surprising behavior, and trust the user in these situations. This effectively reverts https://skia-review.googlesource.com/c/skia/+/48183 Bug: skia: Change-Id: I71c2dd925c567e2862d96ab70c752f19245a69c4 Reviewed-on: https://skia-review.googlesource.com/140500 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Use shader based blending to clamp kPlus mode w/F16Gravatar Brian Osman2017-09-20
| | | | | | | | Bug: skia:6173 Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908 Reviewed-on: https://skia-review.googlesource.com/48183 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Change visitProxies signatureGravatar Robert Phillips2017-09-14
| | | | | | | | | | | There is a perf regression (mainly on the Nexus5) for the https://skia-review.googlesource.com/c/skia/+/46200 (Add method to iterate over a GrOp's GrSurfaceProxies) This is one candidate. Change-Id: I995d3a88bad2a914f24b49512abbf01aeaf579c8 Reviewed-on: https://skia-review.googlesource.com/46586 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add method to iterate over a GrOp's GrSurfaceProxiesGravatar Robert Phillips2017-09-13
| | | | | | | | | The extra generality of having a std::function is for MDB reordering. In the current MDB reordering world there is one pass through the surfaceProxies at creation time and a second pass after flush to create the usage intervals. Change-Id: I3f548417eddc1dad7503d919241301e404255ffe Reviewed-on: https://skia-review.googlesource.com/46200 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@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 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 "Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp""Gravatar Brian Salomon2017-07-19
| | | | | | | | | | | | | This reverts commit e3e9628ecf863f433f26bf6107d6a39ced57fe30. Adds blendmode_mask_* benchs to blacklist for Chromecast. Otherwise a clean revert of the revert. Bug: skia: Change-Id: I9f64ae55804fa4aad97c1785834281039570c56c Reviewed-on: https://skia-review.googlesource.com/24409 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Make GrAtlasTextOp a non-legacy GrMeshDrawOp"Gravatar Brian Salomon2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 434a58ab5fefcc1b86588c7fce898b1e5bd248ba. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make GrAtlasTextOp a non-legacy GrMeshDrawOp > > Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6 > Reviewed-on: https://skia-review.googlesource.com/23482 > Reviewed-by: Jim Van Verth <jvanverth@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7fd8503b4e0c297b2cfaf979545354aa58d1f989 Reviewed-on: https://skia-review.googlesource.com/23760 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make GrAtlasTextOp a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-14
| | | | | | | Change-Id: Ib9eaf149100b0ccecf1c18a755263f2579b8e6f6 Reviewed-on: https://skia-review.googlesource.com/23482 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make ProcessorRefTests op be a non-legacy GrMeshDrawOpGravatar Brian Salomon2017-07-14
| | | | | | | Change-Id: I80f8a7bad1fb8d499a3fec879ddd29ebbefe1eb6 Reviewed-on: https://skia-review.googlesource.com/23324 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make ops in bezier_effects GMs be non-Legacy GrMeshDrawOpsGravatar Brian Salomon2017-07-14
| | | | | | | Change-Id: I1d56536820a61af293a7bce290f35b724c3a8257 Reviewed-on: https://skia-review.googlesource.com/23480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add processor info dumping to non-legacy mesh draw opsGravatar Brian Salomon2017-06-15
| | | | | | | Change-Id: I2ee77f0971a1b627905ac547bc0511042c40ac38 Reviewed-on: https://skia-review.googlesource.com/19816 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Remove static initializer of GrProcessorSet::gEmptyGravatar Brian Salomon2017-05-17
| | | | | | | Change-Id: I9d4cb34c54458ad42a413f251d1018217de26b90 Reviewed-on: https://skia-review.googlesource.com/17206 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Salomon <bsalomon@google.com>
* header cleanupGravatar Hal Canary2017-05-05
| | | | | | | | Change-Id: I9d93add4e7998d8a1aa37cba9e7829fcbda867d5 Reviewed-on: https://skia-review.googlesource.com/15318 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Hal Canary <halcanary@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>
* 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>
* 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>
* Respect xfer barriers in InstancedRendering::OpGravatar Brian Salomon2017-03-31
| | | | | | | | | Fixes a bug introduced when this Op stopped storing a GrPipeline. Change-Id: I1a39814cebe18b321ea369f005bb7759f233cfe6 Reviewed-on: https://skia-review.googlesource.com/10804 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Renames of processor analysis-related classes and method.Gravatar Brian Salomon2017-03-30
| | | | | | | | | | | | GrProcesserSet::FragmentProcessorAnalysis->GrProcessorSet::Analysis GrPipelineAnalysisColor->GrProcessorAnalysisColor GrPipelineAnalysisCoverage->GrProcessorAnalysisCoverage GrMeshDrawOp::getFragmentProcessorAnalysisInputs->GrMeshDrawOp::getProcessorAnalysisInputs Change-Id: I28ad19dfab5f4ac1788c4eacdec5e1af2a701dd0 Reviewed-on: https://skia-review.googlesource.com/10747 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@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 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>
* Changes to GrProcessorSet::FragmentProcessorAnalysis to prepare for deferred ↵Gravatar Brian Salomon2017-03-13
| | | | | | | | | | | | | | | pipeline creation. This compacts the object so that it is more efficient for ops to store it. It also adds a new constructor and query that will allow ops to use the analysis to also store the GrPaint's color. This has the side effect of limiting the number of color processors on a GrProcessorSet to 64K which is just under 64K more than should ever be needed. Change-Id: I4e6bc8e3f81bb2ff6a73af685beb6fb928a3de67 Reviewed-on: https://skia-review.googlesource.com/8972 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove PLS path rendererGravatar Brian Salomon2017-03-06
| | | | | | | Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247 Reviewed-on: https://skia-review.googlesource.com/9300 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Make GrPipelineAnalysis a nested class of GrProcessorSet.Gravatar Brian Salomon2017-02-22
| | | | | | | | | | | | | | | | It is renamed to FragmentProcessorAnalysis since it represents the outputs of the final FPs. It now stores the analysis results that are subsequently needed rather than exposing GrProcOptInfo. GrProcOptInfo is now only used on color FPs (not coverage). Miscellaneous related renamings. Change-Id: I95c518a7a76df6dc294a9fa67c611f8f653247bc Reviewed-on: https://skia-review.googlesource.com/8534 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move srgb enable flags to GrProcessorSet from pipelinebuilderGravatar Brian Salomon2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I533d032a8019980b3870d432ada59bac805d7c36 Reviewed-on: https://skia-review.googlesource.com/7268 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Don't require GrPipelineBuilder to build GrPipelineGravatar Brian Salomon2017-01-19
| | | | | | | Change-Id: Ic978913aa9dd0811eac102755934d77b4853a568 Reviewed-on: https://skia-review.googlesource.com/7207 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Rename GrProcOptInfo::addProcessors to analyzeProcessorsGravatar Brian Salomon2017-01-18
| | | | | | | Change-Id: I49d5fa568d5b9835ee8a76fd8b2b450ece944728 Reviewed-on: https://skia-review.googlesource.com/7182 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add class GrProcessorSet which represents color and coverage FPs and a ↵Gravatar Brian Salomon2017-01-18
XPFactory. Eventually ops can use this to hold their ops and create GrPipelines at flush time. For now it is used by GrPipelineBuilder. Change-Id: I0db3892032f2d07238e4c847a790678b3aab456f Reviewed-on: https://skia-review.googlesource.com/7132 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>