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

Unified Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change RWHVA to add itself to the compositor as per sievers@ comment Created 7 years, 2 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
Index: content/browser/renderer_host/compositor_impl_android.cc
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index da0c00f72cf8797cabecb9575921dbf5eb375d5f..aeb5643f109137e26e5168dd4c45500002478b00 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -27,6 +27,7 @@
#include "cc/trees/layer_tree_host.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
+#include "content/browser/renderer_host/compositor_observer.h"
#include "content/common/gpu/client/command_buffer_proxy_impl.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/common/gpu/client/gl_helper.h"
@@ -494,4 +495,22 @@ WebKit::WGC3Denum CompositorImpl::GetGLTypeForBitmap(gfx::JavaBitmap& bitmap) {
}
}
+void CompositorImpl::AddObserver(CompositorObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void CompositorImpl::RemoveObserver(CompositorObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+bool CompositorImpl::HasObserver(CompositorObserver* observer) {
+ return observer_list_.HasObserver(observer);
+}
+
+void CompositorImpl::DidCommit() {
+ FOR_EACH_OBSERVER(CompositorObserver,
+ observer_list_,
+ OnCompositingDidCommit(this));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698