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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 26753005: Adding compositor callbacks to RenderWidgetHostViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate Compositor plumbing from SetContentView 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/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index 8dd58b75e323e0cbd97a305f0024d9fcf7f8afdc..1a9b17a157bd2a2b0de519dbb0db600d7a6a02ec 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -170,7 +170,8 @@ ContentViewCoreImpl::ContentViewCoreImpl(JNIEnv* env, jobject obj,
kDefaultVSyncIntervalMicros * kDefaultBrowserCompositeVSyncFraction)),
view_android_(view_android),
window_android_(window_android),
- device_orientation_(0) {
+ device_orientation_(0),
+ compositor_(NULL) {
CHECK(web_contents) <<
"A ContentViewCoreImpl should be created with a valid WebContents.";
@@ -231,6 +232,7 @@ void ContentViewCoreImpl::InitWebContents() {
static_cast<WebContentsViewAndroid*>(web_contents_->GetView())->
SetContentViewCore(this);
+
aelias_OOO_until_Jul13 2013/10/19 03:43:27 nit: unnecessary newline
powei 2013/11/08 21:34:47 Done.
DCHECK(!web_contents_->GetUserData(kContentViewUserDataKey));
web_contents_->SetUserData(kContentViewUserDataKey,
new ContentViewUserData(this));
@@ -1606,6 +1608,13 @@ void ContentViewCoreImpl::SendOrientationChangeEventInternal() {
rvhi->SendOrientationChangeEvent(device_orientation_);
}
+void ContentViewCoreImpl::SetCompositor(Compositor* compositor) {
+ compositor_ = compositor;
+ DCHECK(web_contents_);
+ static_cast<WebContentsViewAndroid*>(web_contents_->GetView())->
+ SetCompositor(compositor);
+}
+
// This is called for each ContentView.
jint Init(JNIEnv* env, jobject obj,
jboolean hardware_accelerated,

Powered by Google App Engine
This is Rietveld 408576698