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

Unified Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 793763003: Gradient shaders: make fPtsToUnit const, pre-cache getType(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShaderPriv.h
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 72014d330e5e5503035f95fb2d2f95bbf5bf17dd..125c7b056d681a8782b1029037dc5ea4504abaf6 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -121,7 +121,7 @@ public:
};
public:
- SkGradientShaderBase(const Descriptor& desc);
+ SkGradientShaderBase(const Descriptor& desc, const SkMatrix& ptsToUnit);
virtual ~SkGradientShaderBase();
// The cache is initialized on-demand when getCache16/32 is called.
@@ -223,7 +223,7 @@ protected:
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
SK_TO_STRING_OVERRIDE()
- SkMatrix fPtsToUnit; // set by subclass
+ const SkMatrix fPtsToUnit;
TileMode fTileMode;
TileProc fTileProc;
int fColorCount;
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698