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

Unified Diff: src/gpu/GrDistanceFieldTextContext.h

Issue 466363009: Restore text alloc optimizations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT (again) Created 6 years, 4 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 | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDistanceFieldTextContext.h
diff --git a/src/gpu/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h
index 75a13b385bd2e9ef714096946224b44b5113f6fc..c9fe82d2e571237ed587de66f3e38b423328ae4f 100644
--- a/src/gpu/GrDistanceFieldTextContext.h
+++ b/src/gpu/GrDistanceFieldTextContext.h
@@ -30,18 +30,8 @@ public:
virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
private:
- GrTextStrike* fStrike;
- SkScalar fTextRatio;
- bool fUseLCDText;
- bool fEnableDFRendering;
- SkAutoTUnref<GrEffect> fCachedEffect;
- // Used to check whether fCachedEffect is still valid.
- uint32_t fEffectTextureUniqueID;
- SkColor fEffectColor;
- uint32_t fEffectFlags;
- GrTexture* fGammaTexture;
-
void init(const GrPaint&, const SkPaint&);
+ void allocateVertices(const char text[], size_t byteLength);
void drawPackedGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*);
void flushGlyphs(); // automatically called by destructor
void setupCoverageEffect(const SkColor& filteredColor);
@@ -54,9 +44,19 @@ private:
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
+ GrTextStrike* fStrike;
+ SkScalar fTextRatio;
+ bool fUseLCDText;
+ bool fEnableDFRendering;
+ SkAutoTUnref<GrEffect> fCachedEffect;
+ // Used to check whether fCachedEffect is still valid.
+ uint32_t fEffectTextureUniqueID;
+ SkColor fEffectColor;
+ uint32_t fEffectFlags;
+ GrTexture* fGammaTexture;
+
void* fVertices;
- int32_t fMaxVertices;
- GrTexture* fCurrTexture;
+ int fVertexCount;
int fCurrVertex;
SkRect fVertexBounds;
};
« no previous file with comments | « src/gpu/GrBitmapTextContext.cpp ('k') | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698