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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.cpp

Issue 452823002: Separate GL path rendering state from GrGpuGL to GrGLPathRendering (Closed) Base URL: https://skia.googlesource.com/skia.git@00xx-cherrypick-pathrendering-class
Patch Set: beautify 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
Index: src/gpu/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index d3d711fa020b0d66fc468f164bcd09837eee7cb3..f1fddbe686ad9c4cece0f22782b01f2eeeeb826e 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -167,7 +167,7 @@ void GrStencilAndCoverTextContext::drawText(const GrPaint& paint,
SkAutoGlyphCache autoCache(fSkPaint, &fDeviceProperties, glyphCacheTransform);
fGlyphCache = autoCache.getCache();
fGlyphs = GlyphPathRange::Create(fContext, fGlyphCache, fStroke);
- fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+ fTransformType = GrPathRendering::kTranslate_PathTransformType;
const char* stop = text + byteLength;
@@ -255,7 +255,7 @@ void GrStencilAndCoverTextContext::drawPosText(const GrPaint& paint,
if (SkPaint::kLeft_Align == fSkPaint.getTextAlign()) {
if (1 == scalarsPerPosition) {
- fTransformType = GrDrawTarget::kTranslateX_PathTransformType;
+ fTransformType = GrPathRendering::kTranslateX_PathTransformType;
while (text < stop) {
const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
if (glyph.fWidth) {
@@ -265,7 +265,7 @@ void GrStencilAndCoverTextContext::drawPosText(const GrPaint& paint,
}
} else {
SkASSERT(2 == scalarsPerPosition);
- fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+ fTransformType = GrPathRendering::kTranslate_PathTransformType;
while (text < stop) {
const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
if (glyph.fWidth) {
@@ -275,7 +275,7 @@ void GrStencilAndCoverTextContext::drawPosText(const GrPaint& paint,
}
}
} else {
- fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+ fTransformType = GrPathRendering::kTranslate_PathTransformType;
SkTextMapStateProc tmsProc(SkMatrix::I(), 0, scalarsPerPosition);
SkTextAlignProcScalar alignProc(fSkPaint.getTextAlign());
while (text < stop) {
@@ -408,7 +408,7 @@ void GrStencilAndCoverTextContext::init(const GrPaint& paint,
}
inline void GrStencilAndCoverTextContext::appendGlyph(uint16_t glyphID, float x) {
- SkASSERT(GrDrawTarget::kTranslateX_PathTransformType == fTransformType);
+ SkASSERT(GrPathRendering::kTranslateX_PathTransformType == fTransformType);
if (fPendingGlyphCount >= kGlyphBufferSize) {
this->flush();
@@ -423,7 +423,7 @@ inline void GrStencilAndCoverTextContext::appendGlyph(uint16_t glyphID, float x)
}
inline void GrStencilAndCoverTextContext::appendGlyph(uint16_t glyphID, float x, float y) {
- SkASSERT(GrDrawTarget::kTranslate_PathTransformType == fTransformType);
+ SkASSERT(GrPathRendering::kTranslate_PathTransformType == fTransformType);
if (fPendingGlyphCount >= kGlyphBufferSize) {
this->flush();

Powered by Google App Engine
This is Rietveld 408576698