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

Unified Diff: include/gpu/GrDistanceFieldTextContext.h

Issue 85653004: Move distance field font code into SkGpuDevice (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Clean up formatting and address nits Created 7 years 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 | « include/core/SkPaint.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrDistanceFieldTextContext.h
diff --git a/include/gpu/GrDistanceFieldTextContext.h b/include/gpu/GrDistanceFieldTextContext.h
index 217faf3cb0213eaed917a5c5a56bef9b02800af6..3e00ff2477c4f91be0a793eeab540289b28776cc 100755
--- a/include/gpu/GrDistanceFieldTextContext.h
+++ b/include/gpu/GrDistanceFieldTextContext.h
@@ -17,12 +17,21 @@ class GrTextStrike;
*/
class GrDistanceFieldTextContext : public GrTextContext {
public:
- GrDistanceFieldTextContext(GrContext*, const GrPaint&, SkColor, SkScalar textRatio);
+ GrDistanceFieldTextContext(GrContext*, const GrPaint&, const SkPaint&);
virtual ~GrDistanceFieldTextContext();
virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
GrFontScaler*) SK_OVERRIDE;
+ void drawText(const char text[], size_t byteLength,
+ SkScalar x, SkScalar y, SkGlyphCache*, GrFontScaler*);
+ void drawPosText(const char text[], size_t byteLength,
+ const SkScalar pos[], SkScalar constY,
+ int scalarsPerPosition,
+ SkGlyphCache* cache, GrFontScaler* fontScaler);
+
+ const SkPaint& getSkPaint() { return fSkPaint; }
+
private:
GrTextStrike* fStrike;
SkScalar fTextRatio;
@@ -36,7 +45,7 @@ private:
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
- SkColor fSkPaintColor;
+ SkPaint fSkPaint;
SkPoint* fVertices;
int32_t fMaxVertices;
GrTexture* fCurrTexture;
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698