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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.h

Issue 641613003: Rearrange code in TextContexts to be more consistent. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some more indention clean up Created 6 years, 2 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/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverTextContext.h
diff --git a/src/gpu/GrStencilAndCoverTextContext.h b/src/gpu/GrStencilAndCoverTextContext.h
index b6e23bdb3feeb0b2bd5667d0c235716a22485ddb..dc32025501575777d5f2fb65cd7f1ac3d0b3914e 100644
--- a/src/gpu/GrStencilAndCoverTextContext.h
+++ b/src/gpu/GrStencilAndCoverTextContext.h
@@ -27,6 +27,8 @@ public:
GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&);
virtual ~GrStencilAndCoverTextContext();
+ virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
+
virtual void drawText(const GrPaint&, const SkPaint&, const char text[],
size_t byteLength,
SkScalar x, SkScalar y) SK_OVERRIDE;
@@ -35,8 +37,6 @@ public:
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset) SK_OVERRIDE;
- virtual bool canDraw(const SkPaint& paint) SK_OVERRIDE;
-
private:
static const int kGlyphBufferSize = 1024;
@@ -61,6 +61,18 @@ private:
kMaxPerformance_RenderMode,
};
+ GrDrawState::AutoRestoreEffects fStateRestore;
+ SkScalar fTextRatio;
+ float fTextInverseRatio;
+ SkGlyphCache* fGlyphCache;
+ GrPathRange* fGlyphs;
+ uint32_t fIndexBuffer[kGlyphBufferSize];
+ float fTransformBuffer[2 * kGlyphBufferSize];
+ GrDrawTarget::PathTransformType fTransformType;
+ int fPendingGlyphCount;
+ SkMatrix fContextInitialMatrix;
+ bool fNeedsDeviceSpaceGlyphs;
+
void init(const GrPaint&, const SkPaint&, size_t textByteLength,
RenderMode, const SkPoint& textTranslate);
void initGlyphs(SkGlyphCache* cache);
@@ -69,17 +81,6 @@ private:
void flush();
void finish();
- GrDrawState::AutoRestoreEffects fStateRestore;
- SkScalar fTextRatio;
- float fTextInverseRatio;
- SkGlyphCache* fGlyphCache;
- GrPathRange* fGlyphs;
- uint32_t fIndexBuffer[kGlyphBufferSize];
- float fTransformBuffer[2 * kGlyphBufferSize];
- GrDrawTarget::PathTransformType fTransformType;
- int fPendingGlyphCount;
- SkMatrix fContextInitialMatrix;
- bool fNeedsDeviceSpaceGlyphs;
};
#endif
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698