Index: src/effects/gradients/SkGradientShaderPriv.h |
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h |
index aeb1301c7f5b6725f30de62ecf215b52aed74cd1..d8d50e8fa0ee9afe2ec017bc2f354a621f0e712f 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, |
+ kSRGB, |
+ kHalfFloat, |
+ }; |
+ |
+ 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; |
}; |