Index: src/gpu/GrStencilAndCoverTextContext.cpp |
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp |
index 6dbfe9f2a270f7ed80d16d59a8be2d4a1d4fcec1..4b121da905d34cfcf1f590511c0a39489faeb9df 100644 |
--- a/src/gpu/GrStencilAndCoverTextContext.cpp |
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp |
@@ -65,6 +65,7 @@ bool GrStencilAndCoverTextContext::canDraw(const SkPaint& paint, const SkMatrix& |
} |
void GrStencilAndCoverTextContext::onDrawText(GrRenderTarget* rt, |
+ const GrClip& clip, |
const GrPaint& paint, |
const SkPaint& skPaint, |
const SkMatrix& viewMatrix, |
@@ -92,7 +93,7 @@ void GrStencilAndCoverTextContext::onDrawText(GrRenderTarget* rt, |
// will turn off the use of device-space glyphs when perspective transforms |
// are in use. |
- this->init(rt, paint, skPaint, byteLength, kMaxAccuracy_RenderMode, viewMatrix); |
+ this->init(rt, clip, paint, skPaint, byteLength, kMaxAccuracy_RenderMode, viewMatrix); |
// Transform our starting point. |
if (fUsingDeviceSpaceGlyphs) { |
@@ -155,6 +156,7 @@ void GrStencilAndCoverTextContext::onDrawText(GrRenderTarget* rt, |
} |
void GrStencilAndCoverTextContext::onDrawPosText(GrRenderTarget* rt, |
+ const GrClip& clip, |
const GrPaint& paint, |
const SkPaint& skPaint, |
const SkMatrix& viewMatrix, |
@@ -179,7 +181,7 @@ void GrStencilAndCoverTextContext::onDrawPosText(GrRenderTarget* rt, |
// transform is not part of SkPaint::measureText API, and thus we use the |
// same glyphs as what were measured. |
- this->init(rt, paint, skPaint, byteLength, kMaxPerformance_RenderMode, viewMatrix); |
+ this->init(rt, clip, paint, skPaint, byteLength, kMaxPerformance_RenderMode, viewMatrix); |
SkDrawCacheProc glyphCacheProc = fSkPaint.getDrawCacheProc(); |
@@ -232,12 +234,13 @@ static GrPathRange* get_gr_glyphs(GrContext* ctx, |
} |
void GrStencilAndCoverTextContext::init(GrRenderTarget* rt, |
+ const GrClip& clip, |
const GrPaint& paint, |
const SkPaint& skPaint, |
size_t textByteLength, |
RenderMode renderMode, |
const SkMatrix& viewMatrix) { |
- GrTextContext::init(rt, paint, skPaint); |
+ GrTextContext::init(rt, clip, paint, skPaint); |
fContextInitialMatrix = viewMatrix; |
fViewMatrix = viewMatrix; |
@@ -442,7 +445,7 @@ void GrStencilAndCoverTextContext::flush() { |
inverse.mapPoints(&fGlyphPositions[fFallbackGlyphsIdx], fallbackGlyphCount); |
} |
- fFallbackTextContext->drawPosText(fRenderTarget, paintFallback, skPaintFallback, |
+ fFallbackTextContext->drawPosText(fRenderTarget, fClip, paintFallback, skPaintFallback, |
fViewMatrix, (char*)&fGlyphIndices[fFallbackGlyphsIdx], |
2 * fallbackGlyphCount, |
get_xy_scalar_array(&fGlyphPositions[fFallbackGlyphsIdx]), |