summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/src/core/SkMaskGamma.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/src/core/SkMaskGamma.h')
-rw-r--r--chromium/third_party/skia/src/core/SkMaskGamma.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/third_party/skia/src/core/SkMaskGamma.h b/chromium/third_party/skia/src/core/SkMaskGamma.h
index 1f2b73caacd..08ed97f913f 100644
--- a/chromium/third_party/skia/src/core/SkMaskGamma.h
+++ b/chromium/third_party/skia/src/core/SkMaskGamma.h
@@ -136,6 +136,22 @@ public:
*/
PreBlend preBlend(SkColor color) const;
+ /**
+ * Get dimensions for the full table set, so it can be allocated as a block.
+ */
+ void getGammaTableDimensions(int* tableWidth, int* numTables) const {
+ *tableWidth = 256;
+ *numTables = (1 << MAX_LUM_BITS);
+ }
+
+ /**
+ * Provides direct access to the full table set, so it can be uploaded
+ * into a texture.
+ */
+ const uint8_t* getGammaTables() const {
+ return (const uint8_t*) fGammaTables;
+ }
+
private:
static const int MAX_LUM_BITS =
B_LUM_BITS > (R_LUM_BITS > G_LUM_BITS ? R_LUM_BITS : G_LUM_BITS)