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

Unified Diff: ui/compositor/compositor.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: remove unused test file. 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: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 19c43ce2af45fabed5f6895b9bc119b89c107236..9fb82223ace78f692846a3c574a84139a2495629 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -220,7 +220,7 @@ Compositor::Compositor(ui::ContextFactory* context_factory,
cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId());
host_->animation_host()->AddAnimationTimeline(animation_timeline_.get());
- host_->SetRootLayer(root_web_layer_);
+ host_->GetLayerTree()->SetRootLayer(root_web_layer_);
host_->set_surface_client_id(surface_id_allocator_->client_id());
host_->SetVisible(true);
}
@@ -324,7 +324,8 @@ cc::AnimationTimeline* Compositor::GetAnimationTimeline() const {
void Compositor::SetHostHasTransparentBackground(
bool host_has_transparent_background) {
- host_->set_has_transparent_background(host_has_transparent_background);
+ host_->GetLayerTree()->set_has_transparent_background(
+ host_has_transparent_background);
}
void Compositor::ScheduleFullRedraw() {
@@ -356,13 +357,13 @@ void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
DCHECK_GT(scale, 0);
if (!size_in_pixel.IsEmpty()) {
size_ = size_in_pixel;
- host_->SetViewportSize(size_in_pixel);
+ host_->GetLayerTree()->SetViewportSize(size_in_pixel);
root_web_layer_->SetBounds(size_in_pixel);
context_factory_->ResizeDisplay(this, size_in_pixel);
}
if (device_scale_factor_ != scale) {
device_scale_factor_ = scale;
- host_->SetDeviceScaleFactor(scale);
+ host_->GetLayerTree()->SetDeviceScaleFactor(scale);
if (root_layer_)
root_layer_->OnDeviceScaleFactorChanged(scale);
}
@@ -373,7 +374,7 @@ void Compositor::SetDisplayColorSpace(const gfx::ColorSpace& color_space) {
}
void Compositor::SetBackgroundColor(SkColor color) {
- host_->set_background_color(color);
+ host_->GetLayerTree()->set_background_color(color);
ScheduleDraw();
}

Powered by Google App Engine
This is Rietveld 408576698