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/GrDistanceFieldTextContext.h b/src/gpu/GrDistanceFieldTextContext.h
index c9fe82d..75a13b3 100644
--- a/src/gpu/GrDistanceFieldTextContext.h
+++ b/src/gpu/GrDistanceFieldTextContext.h
@@ -30,8 +30,18 @@
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);
@@ -44,19 +54,9 @@
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;
- int fVertexCount;
+ int32_t fMaxVertices;
+ GrTexture* fCurrTexture;
int fCurrVertex;
SkRect fVertexBounds;
};