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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 707723005: Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/SkGpuDevice.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 96c071473ca303630f692c7da39d1cbd9caf8001..da81c696d2aa5857ee5d6e5b3b878fa9bebc7ed5 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -67,7 +67,7 @@
#define DO_DEFERRED_CLEAR() \
do { \
- if (fFlags & kNeedClear_Flag) { \
+ if (fNeedClear) { \
this->clear(SK_ColorTRANSPARENT); \
} \
} while (false) \
@@ -137,7 +137,7 @@
fContext = SkRef(surface->getContext());
- fFlags = flags;
+ fNeedClear = flags & kNeedClear_Flag;
fRenderTarget = SkRef(surface->asRenderTarget());
@@ -148,8 +148,8 @@
this->setPixelGeometry(props.pixelGeometry());
- bool useDFT = SkToBool(flags & kDFText_Flag);
- fTextContext = fContext->createTextContext(fRenderTarget, this->getLeakyProperties(), useDFT);
+ bool useDFFonts = !!(flags & kDFFonts_Flag);
+ fTextContext = fContext->createTextContext(fRenderTarget, this->getLeakyProperties(), useDFFonts);
}
SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo,
@@ -310,7 +310,7 @@
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::clear", fContext);
SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
fContext->clear(&rect, SkColor2GrColor(color), true, fRenderTarget);
- fFlags &= ~kNeedClear_Flag;
+ fNeedClear = false;
}
void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) {
@@ -1473,7 +1473,7 @@
// clear of the source device must occur before CHECK_SHOULD_DRAW
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawDevice", fContext);
SkGpuDevice* dev = static_cast<SkGpuDevice*>(device);
- if (dev->fFlags & kNeedClear_Flag) {
+ if (dev->fNeedClear) {
// TODO: could check here whether we really need to draw at all
dev->clear(0x0);
}
@@ -1763,8 +1763,6 @@
SkAutoTUnref<GrTexture> texture;
// Skia's convention is to only clear a device if it is non-opaque.
unsigned flags = info.isOpaque() ? 0 : kNeedClear_Flag;
- // If we're using distance field text, enable in the new device
- flags |= (fFlags & kDFText_Flag) ? kDFText_Flag : 0;
#if CACHE_COMPATIBLE_DEVICE_TEXTURES
// layers are never draw in repeat modes, so we can request an approx
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698