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

Unified Diff: src/gpu/GrDrawContext.cpp

Issue 1191943002: Add useDFT field to SkDeviceProperties (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 5 years, 6 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
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 7f9727516b933eecb072255c6c02a8ef0173b88b..6fd24ca1bfbad2ce5396d172b9f0d4b6a249651d 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);
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698