aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrFragmentProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-05-22 13:09:48 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-22 19:34:46 +0000
commit1c5489412de12ab9afdbc0085e65418ca8753b43 (patch)
treec153d1e151f6ea23dec4f51fb58ed935e42e213e /src/gpu/GrFragmentProcessor.cpp
parent91dfa3b571f1048d70033385de2c0c8b4a07373f (diff)
ccpr: Remove local matrix data from path instances
Uses the built-in local matrix code instead trying to bake it into the path instance data. If we find a case that can benefit from this type of optimization in the future, we can use something like a texel buffer and send in all of the coord transform data -- not just the local matrix. Bug: skia: Change-Id: I194bc9e4f83e588f8aa93a1a4d40097475d84977 Reviewed-on: https://skia-review.googlesource.com/129332 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrFragmentProcessor.cpp')
-rw-r--r--src/gpu/GrFragmentProcessor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 719ab7e451..93e1c7fa8b 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -479,6 +479,15 @@ GrFragmentProcessor::Iter::Iter(const GrPipeline& pipeline) {
}
}
+GrFragmentProcessor::Iter::Iter(const GrPaint& paint) {
+ for (int i = paint.numCoverageFragmentProcessors() - 1; i >= 0; --i) {
+ fFPStack.push_back(paint.getCoverageFragmentProcessor(i));
+ }
+ for (int i = paint.numColorFragmentProcessors() - 1; i >= 0; --i) {
+ fFPStack.push_back(paint.getColorFragmentProcessor(i));
+ }
+}
+
const GrFragmentProcessor* GrFragmentProcessor::Iter::next() {
if (fFPStack.empty()) {
return nullptr;