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

Unified Diff: src/gpu/GrBitmapTextContext.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 | « gm/fontcache.cpp ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBitmapTextContext.h
diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrBitmapTextContext.h
index 6d4ea6d524e255d57e802bbb5c52502c12642625..24ee7e8cfe7c9da8794fe5c293018404c34af210 100644
--- a/src/gpu/GrBitmapTextContext.h
+++ b/src/gpu/GrBitmapTextContext.h
@@ -30,9 +30,8 @@ public:
virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
private:
- GrTextStrike* fStrike;
-
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 finish();
@@ -44,12 +43,13 @@ private:
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
- void* fVertices;
- int32_t fMaxVertices;
- GrTexture* fCurrTexture;
+ GrTextStrike* fStrike;
SkAutoTUnref<GrEffect> fCachedEffect;
// Used to check whether fCachedEffect is still valid.
uint32_t fEffectTextureUniqueID;
+
+ void* fVertices;
+ int fVertexCount;
int fCurrVertex;
SkRect fVertexBounds;
};
« no previous file with comments | « gm/fontcache.cpp ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698