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

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

Issue 2487713002: Resolves layering violation in SynchronousCompositorHost creation (Closed)
Patch Set: sc/cvc part ways Created 4 years, 1 month 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/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 78c0d2271379a3629f84f3621665b921121d1daf..37c3ebad33211b6c3d81d56a5ad846884fdce050 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -450,6 +450,7 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
this),
stylus_text_selector_(this),
using_browser_compositor_(CompositorImpl::IsInitialized()),
+ synchronous_compositor_client_(nullptr),
frame_evictor_(new DelegatedFrameEvictor(this)),
locks_on_frame_count_(0),
observing_root_window_(false),
@@ -1205,6 +1206,14 @@ void RenderWidgetHostViewAndroid::SynchronousFrameMetadata(
}
}
+void RenderWidgetHostViewAndroid::SetSynchronousCompositorClient(
+ SynchronousCompositorClient* client) {
+ synchronous_compositor_client_ = client;
+ if (!sync_compositor_) {
boliu 2016/11/10 21:24:33 || !synchronous_compositor_client_ too maybe? jus
Jinsuk Kim 2016/11/10 21:33:34 Done.
+ sync_compositor_ = SynchronousCompositorHost::Create(this);
+ }
+}
+
bool RenderWidgetHostViewAndroid::SupportsAnimation() const {
// The synchronous (WebView) compositor does not have a proper browser
// compositor with which to drive animations.
@@ -1788,11 +1797,6 @@ void RenderWidgetHostViewAndroid::SetContentViewCore(
overscroll_controller_ = CreateOverscrollController(
content_view_core_, ui::GetScaleFactorForNativeView(GetNativeView()));
}
-
- if (!sync_compositor_) {
- sync_compositor_ = SynchronousCompositorHost::Create(
- this, content_view_core_->GetWebContents());
- }
}
void RenderWidgetHostViewAndroid::RunAckCallbacks() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.h ('k') | content/browser/web_contents/web_contents_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698