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

Unified Diff: cc/layers/picture_layer.cc

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index c83d5e002b8f8d63b489508507e30d478652abee..6f4f7ac05a409cc0472a698a8a2098686517cd46 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -79,10 +79,10 @@ void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
if (!recording_source_)
recording_source_.reset(new RecordingSource);
recording_source_->SetSlowdownRasterScaleFactor(
- host->debug_state().slow_down_raster_scale_factor);
+ host->GetDebugState().slow_down_raster_scale_factor);
// If we need to enable image decode tasks, then we have to generate the
// discardable images metadata.
- const LayerTreeSettings& settings = layer_tree_host()->settings();
+ const LayerTreeSettings& settings = layer_tree_host()->GetSettings();
recording_source_->SetGenerateDiscardableImagesMetadata(
settings.image_decode_tasks_enabled);
}
@@ -95,7 +95,7 @@ void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) {
}
bool PictureLayer::Update() {
- update_source_frame_number_ = layer_tree_host()->source_frame_number();
+ update_source_frame_number_ = layer_tree_host()->SourceFrameNumber();
bool updated = Layer::Update();
gfx::Size layer_size = paint_properties().bounds;
@@ -105,11 +105,10 @@ bool PictureLayer::Update() {
!contents_opaque() &&
!picture_layer_inputs_.client->FillsBoundsCompletely());
- TRACE_EVENT1("cc", "PictureLayer::Update",
- "source_frame_number",
- layer_tree_host()->source_frame_number());
+ TRACE_EVENT1("cc", "PictureLayer::Update", "source_frame_number",
+ layer_tree_host()->SourceFrameNumber());
devtools_instrumentation::ScopedLayerTreeTask update_layer(
- devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->id());
+ devtools_instrumentation::kUpdateLayer, id(), layer_tree_host()->GetId());
// UpdateAndExpandInvalidation will give us an invalidation that covers
// anything not explicitly recorded in this frame. We give this region
@@ -288,7 +287,7 @@ void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
}
void PictureLayer::DropRecordingSourceContentIfInvalid() {
- int source_frame_number = layer_tree_host()->source_frame_number();
+ int source_frame_number = layer_tree_host()->SourceFrameNumber();
gfx::Size recording_source_bounds = recording_source_->GetSize();
gfx::Size layer_bounds = bounds();
« no previous file with comments | « cc/layers/picture_image_layer.cc ('k') | cc/layers/picture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698