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

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

Issue 1436663003: Implement multi-color-stops in linear gradients using Sk4f (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/effects/gradients/SkLinearGradient.h » ('j') | src/effects/gradients/SkLinearGradient.cpp » ('J')
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 a295b5cf93448237fa0fc70ceed23435ba5e99b9..9187f408a71fec88d67a669c3c12492151eb1d0f 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -259,8 +259,13 @@ private:
kStorageSize = kColorStorageCount * (sizeof(SkColor) + sizeof(SkScalar) + sizeof(Rec))
};
SkColor fStorage[(kStorageSize + 3) >> 2];
+public:
SkColor* fOrigColors; // original colors, before modulation by paint in context.
SkScalar* fOrigPos; // original positions
+
+ bool colorsAreOpaque() const { return fColorsAreOpaque; }
+
+private:
bool fColorsAreOpaque;
GradientShaderCache* refCache(U8CPU alpha, bool dither) const;
« no previous file with comments | « no previous file | src/effects/gradients/SkLinearGradient.h » ('j') | src/effects/gradients/SkLinearGradient.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698