 Chromium Code Reviews
 Chromium Code Reviews Issue 2487713002:
  Resolves layering violation in SynchronousCompositorHost creation  (Closed)
    
  
    Issue 2487713002:
  Resolves layering violation in SynchronousCompositorHost creation  (Closed) 
  | 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() { |