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

Unified Diff: tools/skiaserve/Request.cpp

Issue 1789723003: Flush the pipe in skiaserve when we switch to GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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: tools/skiaserve/Request.cpp
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index a0580754107667994ee4d12b03a8521a4d7a6ccb..61f0e1041cd97683114f065ffe06dc65d0afea16 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -177,6 +177,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;
« 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