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

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

Issue 2183403002: cc: Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@layer_tree_change
Patch Set: Missed one test. Created 4 years, 4 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 db423ccb31f8d85f5078207c3ba47dfc6b296197..915926e8226b3dc9205aed5f85ae5b9079443d20 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -500,11 +500,12 @@ void CompositorImpl::CreateLayerTreeHost() {
params.animation_host = cc::AnimationHost::CreateMainInstance();
host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
DCHECK(!host_->visible());
- host_->SetRootLayer(root_window_->GetLayer());
+ host_->GetLayerTree()->SetRootLayer(root_window_->GetLayer());
host_->set_surface_client_id(surface_id_allocator_->client_id());
- host_->SetViewportSize(size_);
- host_->set_has_transparent_background(has_transparent_background_);
- host_->SetDeviceScaleFactor(device_scale_factor_);
+ host_->GetLayerTree()->SetViewportSize(size_);
+ host_->GetLayerTree()->set_has_transparent_background(
+ has_transparent_background_);
+ host_->GetLayerTree()->SetDeviceScaleFactor(device_scale_factor_);
if (needs_animate_)
host_->SetNeedsAnimate();
@@ -529,7 +530,7 @@ void CompositorImpl::SetVisible(bool visible) {
void CompositorImpl::setDeviceScaleFactor(float factor) {
device_scale_factor_ = factor;
if (host_)
- host_->SetDeviceScaleFactor(factor);
+ host_->GetLayerTree()->SetDeviceScaleFactor(factor);
}
void CompositorImpl::SetWindowBounds(const gfx::Size& size) {
@@ -538,7 +539,7 @@ void CompositorImpl::SetWindowBounds(const gfx::Size& size) {
size_ = size;
if (host_)
- host_->SetViewportSize(size);
+ host_->GetLayerTree()->SetViewportSize(size);
if (display_)
display_->Resize(size);
root_window_->GetLayer()->SetBounds(size);
@@ -547,7 +548,7 @@ void CompositorImpl::SetWindowBounds(const gfx::Size& size) {
void CompositorImpl::SetHasTransparentBackground(bool flag) {
has_transparent_background_ = flag;
if (host_)
- host_->set_has_transparent_background(flag);
+ host_->GetLayerTree()->set_has_transparent_background(flag);
}
void CompositorImpl::SetNeedsComposite() {

Powered by Google App Engine
This is Rietveld 408576698