| Index: src/gpu/GrDistanceFieldTextContext.cpp
|
| diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
|
| index 2a439da4f27e5743171f8338fbeadb7d4720f0ce..18dc0e553f9f1dc1035a00e048e1e2b19a1db689 100755
|
| --- a/src/gpu/GrDistanceFieldTextContext.cpp
|
| +++ b/src/gpu/GrDistanceFieldTextContext.cpp
|
| @@ -42,9 +42,10 @@ static const int kVerticesPerGlyph = 4;
|
| static const int kIndicesPerGlyph = 6;
|
|
|
| GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context,
|
| + SkGpuDevice* gpuDevice,
|
| const SkDeviceProperties& properties,
|
| bool enable)
|
| - : GrTextContext(context, properties) {
|
| + : GrTextContext(context, gpuDevice, properties) {
|
| #if SK_FORCE_DISTANCE_FIELD_TEXT
|
| fEnableDFRendering = true;
|
| #else
|
| @@ -67,11 +68,12 @@ GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context,
|
| }
|
|
|
| GrDistanceFieldTextContext* GrDistanceFieldTextContext::Create(GrContext* context,
|
| + SkGpuDevice* gpuDevice,
|
| const SkDeviceProperties& props,
|
| bool enable) {
|
| GrDistanceFieldTextContext* textContext = SkNEW_ARGS(GrDistanceFieldTextContext,
|
| - (context, props, enable));
|
| - textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, props);
|
| + (context, gpuDevice, props, enable));
|
| + textContext->fFallbackTextContext = GrBitmapTextContext::Create(context, gpuDevice, props);
|
|
|
| return textContext;
|
| }
|
| @@ -270,8 +272,8 @@ void GrDistanceFieldTextContext::onDrawText(GrRenderTarget* rt, const GrClip& cl
|
| y -= alignY;
|
| SkPoint offset = SkPoint::Make(x, y);
|
|
|
| - this->drawPosText(rt, clip, paint, skPaint, viewMatrix, text, byteLength, positions.begin(), 2,
|
| - offset);
|
| + this->onDrawPosText(rt, clip, paint, skPaint, viewMatrix, text, byteLength, positions.begin(),
|
| + 2, offset);
|
| }
|
|
|
| void GrDistanceFieldTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip& clip,
|
| @@ -365,9 +367,9 @@ void GrDistanceFieldTextContext::onDrawPosText(GrRenderTarget* rt, const GrClip&
|
| this->finish();
|
|
|
| if (fallbackTxt.count() > 0) {
|
| - fFallbackTextContext->drawPosText(rt, clip, paint, skPaint, viewMatrix, fallbackTxt.begin(),
|
| - fallbackTxt.count(), fallbackPos.begin(),
|
| - scalarsPerPosition, offset);
|
| + fFallbackTextContext->onDrawPosText(rt, clip, paint, skPaint, viewMatrix,
|
| + fallbackTxt.begin(), fallbackTxt.count(),
|
| + fallbackPos.begin(), scalarsPerPosition, offset);
|
| }
|
| }
|
|
|
|
|