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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 1073893004: Fix blank video in Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | content/browser/android/in_process/synchronous_compositor_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/in_process/synchronous_compositor_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc
index da0f2661eba20f2c147d7e5e4cca1691a3dcb4f5..f8701c1a00af71945d2af9cb96164ffda94dc0ef 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -216,7 +216,14 @@ void SynchronousCompositorImpl::SetMemoryPolicy(size_t bytes_limit) {
DCHECK(CalledOnValidThread());
DCHECK(output_surface_);
+ size_t current_bytes_limit = output_surface_->GetMemoryPolicy();
output_surface_->SetMemoryPolicy(bytes_limit);
+
+ if (bytes_limit && !current_bytes_limit) {
+ g_factory.Get().CompositorInitializedHardwareDraw();
+ } else if (!bytes_limit && current_bytes_limit) {
+ g_factory.Get().CompositorReleasedHardwareDraw();
+ }
}
void SynchronousCompositorImpl::PostInvalidate() {
« no previous file with comments | « no previous file | content/browser/android/in_process/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698