diff options
author | 2016-03-11 12:08:15 -0800 | |
---|---|---|
committer | 2016-03-11 12:08:15 -0800 | |
commit | 98bd5b1e622047a62472c891cef5997a087edc22 (patch) | |
tree | 215236ee4de79bb5dd98c6adc202b872c3df41eb /tools/skiaserve | |
parent | 4083610290308faae347ed94cf7aff9895af6289 (diff) |
Flush the pipe in skiaserve when we switch to GPU
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789723003
Review URL: https://codereview.chromium.org/1789723003
Diffstat (limited to 'tools/skiaserve')
-rw-r--r-- | tools/skiaserve/Request.cpp | 7 |
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; |