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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 943623002: Do not clear the source device in SkGpuDevice::drawDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | 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 630755b8c3f7581c6d5158bc7071a766a9205363..9760968e54970f8259fda84585b560b4575ac9b2 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1544,10 +1544,10 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
// 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 (fNeedClear) {
- // TODO: could check here whether we really need to draw at all
- dev->clearAll();
- }
+
+ // TODO: If the source device covers the whole of this device, we could
+ // omit fNeedsClear -related flushing.
+ // TODO: if source needs clear, we could maybe omit the draw fully.
// drawDevice is defined to be in device coords.
CHECK_SHOULD_DRAW(draw);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698