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

Unified Diff: src/gpu/GrAtlasTextContext.h

Issue 1098653005: A small patch to enable distance field text in textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@atdfnow2
Patch Set: rebase Created 5 years, 8 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/gpu/GrAtlasTextContext.cpp » ('j') | src/gpu/GrAtlasTextContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.h
diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h
index cf2ba6bcc2cb947152e7a31fa2b075275fbf2a41..25336aaf12b8e36eb30a8d3c6654bd57f104380a 100644
--- a/src/gpu/GrAtlasTextContext.h
+++ b/src/gpu/GrAtlasTextContext.h
@@ -209,6 +209,10 @@ private:
};
StrokeInfo fStrokeInfo;
GrMemoryPool* fPool;
+ bool fHasDistanceField;
jvanverth1 2015/04/20 17:54:07 I think a bitfield and an enum with two values wou
+ bool fHasBitmap;
+
+ BitmapTextBlob() : fHasDistanceField(false), fHasBitmap(false) {}
// all glyph / vertex offsets are into these pools.
unsigned char* fVertices;
@@ -293,7 +297,8 @@ private:
const GrPaint&, const GrClip&);
// A helper for drawing BitmapText in a run of distance fields
- inline void fallbackDrawPosText(BitmapTextBlob*, GrRenderTarget*, const GrClip&,
+ inline void fallbackDrawPosText(BitmapTextBlob*, int runIndex,
+ GrRenderTarget*, const GrClip&,
const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix,
const SkTDArray<char>& fallbackTxt,
@@ -339,7 +344,8 @@ private:
void regenerateTextBlob(BitmapTextBlob* bmp, const SkPaint& skPaint, GrColor,
const SkMatrix& viewMatrix,
const SkTextBlob* blob, SkScalar x, SkScalar y,
- SkDrawFilter* drawFilter, const SkIRect& clipRect);
+ SkDrawFilter* drawFilter, const SkIRect& clipRect, GrRenderTarget*,
+ const GrClip&, const GrPaint&);
inline static bool HasLCD(const SkTextBlob*);
inline void initDistanceFieldPaint(SkPaint*, SkScalar* textRatio, const SkMatrix&);
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | src/gpu/GrAtlasTextContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698