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

Unified Diff: include/gpu/GrDistanceFieldTextContext.h

Issue 41213003: Hook in rough distance field support for fonts (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Replace magic number 32 with constant; fix comment in shader; fix Linux compiler error. Created 7 years, 1 month 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 | « gyp/gpu.gyp ('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/GrBitmapTextContext.h b/include/gpu/GrDistanceFieldTextContext.h
similarity index 63%
copy from include/gpu/GrBitmapTextContext.h
copy to include/gpu/GrDistanceFieldTextContext.h
index e0900ecd7d625629418dd26e29a40d6617070bee..217faf3cb0213eaed917a5c5a56bef9b02800af6 100755
--- a/include/gpu/GrBitmapTextContext.h
+++ b/include/gpu/GrDistanceFieldTextContext.h
@@ -5,27 +5,27 @@
* found in the LICENSE file.
*/
-#ifndef GrBitmapTextContext_DEFINED
-#define GrBitmapTextContext_DEFINED
+#ifndef GrDistanceFieldTextContext_DEFINED
+#define GrDistanceFieldTextContext_DEFINED
#include "GrTextContext.h"
class GrTextStrike;
/*
- * This class implements GrTextContext using standard bitmap fonts
+ * This class implements GrTextContext using distance field fonts
*/
-class GrBitmapTextContext : public GrTextContext {
+class GrDistanceFieldTextContext : public GrTextContext {
public:
- GrBitmapTextContext(GrContext*, const GrPaint&, SkColor);
- virtual ~GrBitmapTextContext();
+ GrDistanceFieldTextContext(GrContext*, const GrPaint&, SkColor, SkScalar textRatio);
+ virtual ~GrDistanceFieldTextContext();
virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
- GrFontScaler*) SK_OVERRIDE;
+ GrFontScaler*) SK_OVERRIDE;
private:
- GrContext::AutoMatrix fAutoMatrix;
- GrTextStrike* fStrike;
+ GrTextStrike* fStrike;
+ SkScalar fTextRatio;
void flushGlyphs(); // automatically called by destructor
« no previous file with comments | « gyp/gpu.gyp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698