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

Unified Diff: cc/output/gl_renderer.cc

Issue 1692563003: cc: flush the drawing before unlocking the filtered source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 1af26c1cc7f6fe579aaad98664408a911201a667..2b20d25d39f18f17a362c4b0d88c4efa9d506731 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -655,7 +655,11 @@ static skia::RefPtr<SkImage> ApplyImageFilter(
surface->getCanvas()->translate(-dst_rect.x(), -dst_rect.y());
surface->getCanvas()->drawImage(srcImage.get(), src_rect.x(), src_rect.y(),
&paint);
-
+ // Flush the drawing before source texture read lock goes out of scope.
+ // Skia API does not guarantee that when the SkImage goes out of scope,
+ // its externally referenced resources would force the rendering to be
+ // flushed.
+ surface->getCanvas()->flush();
Kimmo Kinnunen 2016/02/11 18:51:45 Note: naturally this trades off msaa perf for corr
ericrk 2016/02/11 22:03:20 Ok... Now I understand what's going on here a bit
skia::RefPtr<SkImage> image = skia::AdoptRef(surface->newImageSnapshot());
if (!image || !image->isTextureBacked()) {
return skia::RefPtr<SkImage>();
« 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