diff options
author | robertphillips <robertphillips@google.com> | 2015-06-18 05:27:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-18 05:27:18 -0700 |
commit | bcd7ab5c0d0e5c3432a9aaeb44f1b703fea94282 (patch) | |
tree | 56e2d6b486f4d93ab21ac485750b85aca643a64c /src/gpu/GrDrawContext.cpp | |
parent | 00b621cfc0dac2a0028757a974de33a78bb8579d (diff) |
Add useDFT field to SkDeviceProperties
Review URL: https://codereview.chromium.org/1191943002
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r-- | src/gpu/GrDrawContext.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp index 7f9727516b..6fd24ca1bf 100644 --- a/src/gpu/GrDrawContext.cpp +++ b/src/gpu/GrDrawContext.cpp @@ -34,13 +34,11 @@ private: GrDrawContext::GrDrawContext(GrContext* context, GrDrawTarget* drawTarget, - const SkDeviceProperties& devProps, - bool useDFT) + const SkDeviceProperties& devProps) : fContext(context) , fDrawTarget(SkRef(drawTarget)) , fTextContext(NULL) - , fDevProps(SkNEW_ARGS(SkDeviceProperties, (devProps))) - , fUseDFT(useDFT) { + , fDevProps(SkNEW_ARGS(SkDeviceProperties, (devProps))) { } GrDrawContext::~GrDrawContext() { @@ -59,19 +57,16 @@ void GrDrawContext::copySurface(GrRenderTarget* dst, GrSurface* src, } GrTextContext* GrDrawContext::createTextContext(GrRenderTarget* renderTarget, - const SkDeviceProperties& leakyProperties, - bool enableDistanceFieldFonts) { + const SkDeviceProperties& leakyProperties) { if (fContext->caps()->shaderCaps()->pathRenderingSupport() && renderTarget->isStencilBufferMultisampled()) { GrStencilAttachment* sb = renderTarget->renderTargetPriv().attachStencilAttachment(); if (sb) { - return GrStencilAndCoverTextContext::Create(fContext, this, - leakyProperties, - enableDistanceFieldFonts); + return GrStencilAndCoverTextContext::Create(fContext, this, leakyProperties); } } - return GrAtlasTextContext::Create(fContext, this, leakyProperties, enableDistanceFieldFonts); + return GrAtlasTextContext::Create(fContext, this, leakyProperties); } void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPaint& grPaint, @@ -80,7 +75,7 @@ void GrDrawContext::drawText(GrRenderTarget* rt, const GrClip& clip, const GrPai const char text[], size_t byteLength, SkScalar x, SkScalar y, const SkIRect& clipBounds) { if (!fTextContext) { - fTextContext = this->createTextContext(rt, *fDevProps, fUseDFT); + fTextContext = this->createTextContext(rt, *fDevProps); } fTextContext->drawText(rt, clip, grPaint, skPaint, viewMatrix, @@ -94,7 +89,7 @@ void GrDrawContext::drawPosText(GrRenderTarget* rt, const GrClip& clip, const Gr const SkScalar pos[], int scalarsPerPosition, const SkPoint& offset, const SkIRect& clipBounds) { if (!fTextContext) { - fTextContext = this->createTextContext(rt, *fDevProps, fUseDFT); + fTextContext = this->createTextContext(rt, *fDevProps); } fTextContext->drawPosText(rt, clip, grPaint, skPaint, viewMatrix, text, byteLength, @@ -106,7 +101,7 @@ void GrDrawContext::drawTextBlob(GrRenderTarget* rt, const GrClip& clip, const S SkScalar x, SkScalar y, SkDrawFilter* filter, const SkIRect& clipBounds) { if (!fTextContext) { - fTextContext = this->createTextContext(rt, *fDevProps, fUseDFT); + fTextContext = this->createTextContext(rt, *fDevProps); } fTextContext->drawTextBlob(rt, clip, skPaint, viewMatrix, blob, x, y, filter, clipBounds); |