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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.h

Issue 400713003: Add a GrPathRange class (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-ispath
Patch Set: Fix more windows trivial warningswq Created 6 years, 5 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
Index: src/gpu/GrStencilAndCoverTextContext.h
diff --git a/src/gpu/GrStencilAndCoverTextContext.h b/src/gpu/GrStencilAndCoverTextContext.h
index 2e79f5c9b7e43f59dcf5234bd780eb81de6e5616..021a84d8760d31d8bebe15c25982cd7e2de3cd56 100644
--- a/src/gpu/GrStencilAndCoverTextContext.h
+++ b/src/gpu/GrStencilAndCoverTextContext.h
@@ -36,17 +36,23 @@ public:
virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
private:
+ class GlyphPathRange;
+ static const int kGlyphBufferSize = 1024;
+
void init(const GrPaint&, const SkPaint&, size_t textByteLength);
- void appendGlyph(GrGlyph::PackedID, const SkPoint&,
- GrTextStrike*, GrFontScaler*);
+ void initGlyphs(SkGlyphCache* cache);
+ void appendGlyph(uint16_t glyphID, float x, float y);
+ void flush();
void finish();
GrDrawState::AutoRestoreEffects fStateRestore;
SkScalar fTextRatio;
SkStrokeRec fStroke;
- SkTDArray<const GrPath*> fPaths;
- SkTDArray<SkMatrix> fTransforms;
- SkPath fTmpPath;
+ SkGlyphCache* fGlyphCache;
+ GlyphPathRange* fGlyphs;
+ uint32_t fIndexBuffer[kGlyphBufferSize];
+ float fTransformBuffer[6 * kGlyphBufferSize];
+ int fPendingGlyphCount;
SkMatrix fGlyphTransform;
bool fNeedsDeviceSpaceGlyphs;
};

Powered by Google App Engine
This is Rietveld 408576698