Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: src/gpu/GrProcessor.cpp

Issue 657923002: Make GrFragmentProcessor auto-compare coord xforms. (Closed) Base URL: https://skia.googlesource.com/skia.git@key
Patch Set: Add \! Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 4e171fc99b0faf3ff93e8f35f3e6be1bb109b1ec..da27abb4a95d4c16271af734bc2555edcb8f7cbf 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -172,3 +172,16 @@ void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
fCoordTransforms.push_back(transform);
SkDEBUGCODE(transform->setInProcessor();)
}
+
+bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) const {
+ if (fCoordTransforms.count() != that.fCoordTransforms.count()) {
+ return false;
+ }
+ int count = fCoordTransforms.count();
+ for (int i = 0; i < count; ++i) {
+ if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) {
+ return false;
+ }
+ }
+ return true;
+}
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698