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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 1225583003: Flush pending writes on Skia scratch textures used in Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 5 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 | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index ca276ca2674f18a24f7c965e447db0cbbe570f6e..a80fc132b6d2eba1d6a5d7433bc67106b4e32fa1 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -117,6 +117,11 @@ bool AllocateSkBitmapTexture(GrContext* gr,
if (!texture.get())
return false;
+ // A recycled texture may have pending writes. Make sure they are flushed
+ // before the texture is handed over for subsequent operations done outside
+ // of Skia.
+ texture->flushWrites();
+
SkImageInfo info = SkImageInfo::MakeN32Premul(desc.fWidth, desc.fHeight);
SkGrPixelRef* pixel_ref = SkNEW_ARGS(SkGrPixelRef, (info, texture.get()));
if (!pixel_ref)
« no previous file with comments | « no previous file | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698