Revert of Restore text alloc optimizations. (patchset #4 of https://codereview.chromium.org/466363009/)
Reason for revert:
GM failures on http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Release/builds/1867/
Original issue's description:
> Restore text vertex buffer alloc and other optimizations.
>
> Modifies the fontcache GM to ensure that the font cache is forced to flush.
>
> Committed: https://skia.googlesource.com/skia/+/9c3d24b9d1ba3d955094ff0cb1ba2d11e1c1adca
R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com
TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/510103003
diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrBitmapTextContext.h
index 24ee7e8..6d4ea6d 100644
--- a/src/gpu/GrBitmapTextContext.h
+++ b/src/gpu/GrBitmapTextContext.h
@@ -30,8 +30,9 @@
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();
@@ -43,13 +44,12 @@
kDefaultRequestedVerts = kDefaultRequestedGlyphs * 4,
};
- GrTextStrike* fStrike;
+ void* fVertices;
+ int32_t fMaxVertices;
+ GrTexture* fCurrTexture;
SkAutoTUnref<GrEffect> fCachedEffect;
// Used to check whether fCachedEffect is still valid.
uint32_t fEffectTextureUniqueID;
-
- void* fVertices;
- int fVertexCount;
int fCurrVertex;
SkRect fVertexBounds;
};