aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-02-19 07:20:40 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-19 07:20:40 -0800
commit2e4414e60b1f98e1736aa1925cbe181ed37d11e8 (patch)
treefc324f541de3232cb94d7c8d20ff6c2c2472adb3 /src/gpu
parent297aaf97a32ac16a2bc3f4bbc231d5de859ac02d (diff)
Do not clear the source device in SkGpuDevice::drawDevice
Do not clear the source device in SkGpuDevice::drawDevice based on the status whether the destination device needs a clear. Source device clear is flushed in SkGpuDevice::accessRenderTarget() and target device clear is flushed in CHECK_SHOULD_DRAW(draw). Review URL: https://codereview.chromium.org/943623002
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/SkGpuDevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 630755b8c3..9760968e54 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);