aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-03-11 12:08:15 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-11 12:08:15 -0800
commit98bd5b1e622047a62472c891cef5997a087edc22 (patch)
tree215236ee4de79bb5dd98c6adc202b872c3df41eb /tools/skiaserve
parent4083610290308faae347ed94cf7aff9895af6289 (diff)
Flush the pipe in skiaserve when we switch to GPU
Diffstat (limited to 'tools/skiaserve')
-rw-r--r--tools/skiaserve/Request.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index f9ad867028..e0aad15aad 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -197,6 +197,13 @@ bool Request::enableGPU(bool enable) {
if (surface) {
fSurface.reset(surface);
fGPUEnabled = true;
+
+ // When we switch to GPU, there seems to be some mystery draws in the canvas. So we
+ // draw once to flush the pipe
+ // TODO understand what is actually happening here
+ fDebugCanvas->drawTo(this->getCanvas(), this->getLastOp());
+ this->getCanvas()->flush();
+
return true;
}
return false;