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

Unified Diff: src/core/SkMaskGamma.h

Issue 258883002: Gamma correction for distance field text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comments for the magic bold factor Created 6 years, 7 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 | « no previous file | src/core/SkPaint.cpp » ('j') | src/core/SkPaint.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMaskGamma.h
diff --git a/src/core/SkMaskGamma.h b/src/core/SkMaskGamma.h
index 1f2b73caacd44fdd92931d812975225bf49b5e46..306b4e5a99f94ba8c60d2e6b5d143df927686684 100644
--- a/src/core/SkMaskGamma.h
+++ b/src/core/SkMaskGamma.h
@@ -136,6 +136,16 @@ public:
*/
PreBlend preBlend(SkColor color) const;
+ /**
+ * Provides direct access to the full table set, so it can be uploaded
+ * into a texture.
+ */
+ const uint8_t* getGammaTables(int& tableWidth, int& numTables) const {
reed1 2014/05/28 19:45:17 style: skia always uses pointers for out-params
jvanverth1 2014/05/29 18:53:49 Done.
+ tableWidth = 256;
+ numTables = (1 << MAX_LUM_BITS);
+ 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)
« no previous file with comments | « no previous file | src/core/SkPaint.cpp » ('j') | src/core/SkPaint.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698