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

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

Issue 241173005: Get gradient information for gpu effect directly from SkGradientShader instead of calling asAGradie… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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') | no next file » | 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 1d0f008917d42d974c393d3fb4c31dbd580d8572..b81915bc71540bb5a14535285f85ad8a9dec0c6a 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -98,6 +98,19 @@ public:
uint32_t fFlags;
};
+ // Specialized Descriptor used for setting up gpu gradient effect
+ struct DescriptorGpu {
bsalomon 2014/04/17 19:23:34 How about we move the logic about whether it is a
+ DescriptorGpu() {
+ sk_bzero(this, sizeof(*this));
+ }
+
+ SkColor* fColors;
+ SkScalar fMidPos;
+ int fCount;
+ SkShader::TileMode fTileMode;
+ uint32_t fFlags;
+ };
+
public:
SkGradientShaderBase(const Descriptor& desc);
virtual ~SkGradientShaderBase();
@@ -185,6 +198,8 @@ public:
kDitherStride16 = kCache16Count,
};
+ void getGradientDescriptorGpu(DescriptorGpu* desc) const;
+
protected:
SkGradientShaderBase(SkReadBuffer& );
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698