aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasTextContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text/GrAtlasTextContext.h')
-rw-r--r--src/gpu/text/GrAtlasTextContext.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gpu/text/GrAtlasTextContext.h b/src/gpu/text/GrAtlasTextContext.h
index edc157552a..a784acb72c 100644
--- a/src/gpu/text/GrAtlasTextContext.h
+++ b/src/gpu/text/GrAtlasTextContext.h
@@ -52,10 +52,12 @@ private:
// sets up the descriptor on the blob and returns a detached cache. Client must attach
inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd);
+ // Determines if we need to use FakeGamma:
+ inline static SkPaint::FakeGamma ComputeFakeGamma(GrDrawContext*, const GrPaint&);
static void RegenerateTextBlob(GrAtlasTextBlob* bmp,
GrBatchFontCache*,
const GrShaderCaps&,
- const SkPaint& skPaint, GrColor,
+ const SkPaint& skPaint, GrColor, SkPaint::FakeGamma,
const SkMatrix& viewMatrix,
const SkSurfaceProps&,
const SkTextBlob* blob, SkScalar x, SkScalar y,
@@ -65,14 +67,16 @@ private:
static inline GrAtlasTextBlob* CreateDrawTextBlob(GrTextBlobCache*,
GrBatchFontCache*, const GrShaderCaps&,
const GrPaint&,
- const SkPaint&, const SkMatrix& viewMatrix,
+ const SkPaint&, SkPaint::FakeGamma,
+ const SkMatrix& viewMatrix,
const SkSurfaceProps&,
const char text[], size_t byteLength,
SkScalar x, SkScalar y);
static inline GrAtlasTextBlob* CreateDrawPosTextBlob(GrTextBlobCache*, GrBatchFontCache*,
const GrShaderCaps&,
const GrPaint&,
- const SkPaint&, const SkMatrix& viewMatrix,
+ const SkPaint&, SkPaint::FakeGamma,
+ const SkMatrix& viewMatrix,
const SkSurfaceProps&,
const char text[], size_t byteLength,
const SkScalar pos[],
@@ -83,6 +87,7 @@ private:
SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable;
#ifdef GR_TEST_UTILS
+ static const SkPaint::FakeGamma kTextBlobBatchFakeGamma = SkPaint::FakeGamma::On;
DRAW_BATCH_TEST_FRIEND(TextBlobBatch);
#endif
};