Index: src/effects/gradients/SkGradientShaderPriv.h |
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h |
index aeb1301c7f5b6725f30de62ecf215b52aed74cd1..9df24d2d7994bf7f877231fca0d0539b2a3c914a 100644 |
--- a/src/effects/gradients/SkGradientShaderPriv.h |
+++ b/src/effects/gradients/SkGradientShaderPriv.h |
@@ -175,7 +175,13 @@ public: |
bool isOpaque() const override; |
- void getGradientTableBitmap(SkBitmap*) const; |
+ enum class GradientBitmapType : uint8_t { |
+ kLegacy = 0, |
+ kSRGB = 1, |
+ kHalfFloat = 2, |
f(malita)
2016/09/21 02:51:35
nit: do we actually care about these values being
Brian Osman
2016/09/21 13:24:18
Nope. Fixed.
|
+ }; |
+ |
+ void getGradientTableBitmap(SkBitmap*, GradientBitmapType bitmapType) const; |
enum { |
/// Seems like enough for visual accuracy. TODO: if pos[] deserves |
@@ -214,6 +220,9 @@ protected: |
bool onAsLuminanceColor(SkColor*) const override; |
+ |
+ void initLinearBitmap(SkBitmap* bitmap) const; |
+ |
/* |
* Takes in pointers to gradient color and Rec info as colorSrc and recSrc respectively. |
* Count is the number of colors in the gradient |
@@ -490,6 +499,7 @@ private: |
SkScalar fCachedYCoord; |
GrGLSLProgramDataManager::UniformHandle fColorsUni; |
GrGLSLProgramDataManager::UniformHandle fFSYUni; |
+ GrGLSLProgramDataManager::UniformHandle fColorSpaceXformUni; |
typedef GrGLSLFragmentProcessor INHERITED; |
}; |