Chromium Code Reviews| Index: src/gpu/text/GrAtlasTextContext.cpp |
| diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp |
| index 9b66d2fa5a984415ef741b4b1a33e43e55eefb52..b46963cf51aaee6e144143c8b7e556c3b0eb97dc 100644 |
| --- a/src/gpu/text/GrAtlasTextContext.cpp |
| +++ b/src/gpu/text/GrAtlasTextContext.cpp |
| @@ -124,8 +124,7 @@ void GrAtlasTextContext::drawTextBlob(GrContext* context, GrDrawContext* dc, |
| // Though for the time being runs in the textblob can override the paint, they only touch font |
| // info. |
| GrPaint grPaint; |
| - if (!SkPaintToGrPaint(context, skPaint, viewMatrix, props.isGammaCorrect(), dc->getColorSpace(), |
| - &grPaint)) { |
| + if (!SkPaintToGrPaint(context, dc, skPaint, viewMatrix, &grPaint)) { |
| return; |
| } |
| @@ -389,7 +388,10 @@ DRAW_BATCH_TEST_DEFINE(TextBlobBatch) { |
| gTextContext = GrAtlasTextContext::Create(); |
| } |
| - // Setup dummy SkPaint / GrPaint |
| + // Setup dummy SkPaint / GrPaint / GrDrawContext |
|
robertphillips
2016/07/25 19:32:02
Can this be 64x64 ?
|
| + sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox, 1024, 1024, |
| + kSkia8888_GrPixelConfig, nullptr)); |
| + |
| GrColor color = GrRandomColor(random); |
| SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); |
| SkPaint skPaint; |
| @@ -399,8 +401,7 @@ DRAW_BATCH_TEST_DEFINE(TextBlobBatch) { |
| skPaint.setSubpixelText(random->nextBool()); |
| GrPaint grPaint; |
| - if (!SkPaintToGrPaint(context, skPaint, viewMatrix, gSurfaceProps.isGammaCorrect(), nullptr, |
| - &grPaint)) { |
| + if (!SkPaintToGrPaint(context, drawContext.get(), skPaint, viewMatrix, &grPaint)) { |
| SkFAIL("couldn't convert paint\n"); |
| } |