| Index: cc/layers/picture_layer.cc
|
| diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
|
| index ca4033f6c39d7e8fabb35b7c0c10d8673f5dc62d..afc67532fc5f19b25ecb0869746bb373bc55c8be 100644
|
| --- a/cc/layers/picture_layer.cc
|
| +++ b/cc/layers/picture_layer.cc
|
| @@ -19,7 +19,6 @@ scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) {
|
|
|
| PictureLayer::PictureLayer(ContentLayerClient* client)
|
| : client_(client),
|
| - pile_(make_scoped_refptr(new PicturePile())),
|
| instrumentation_object_tracker_(id()),
|
| update_source_frame_number_(-1),
|
| can_use_lcd_text_last_frame_(can_use_lcd_text()) {
|
| @@ -40,30 +39,30 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
|
| // Update may not get called for an empty layer, so resize here instead.
|
| // Using layer_impl because either bounds() or paint_properties().bounds
|
| // may disagree and either one could have been pushed to layer_impl.
|
| - pile_->SetEmptyBounds();
|
| + pile_.SetEmptyBounds();
|
| } else if (update_source_frame_number_ ==
|
| layer_tree_host()->source_frame_number()) {
|
| // TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect
|
| // is identical to the layer_rect.
|
| // If update called, then pile size must match bounds pushed to impl layer.
|
| - DCHECK_EQ(layer_impl->bounds().ToString(), pile_->tiling_size().ToString());
|
| + DCHECK_EQ(layer_impl->bounds().ToString(), pile_.tiling_size().ToString());
|
| }
|
|
|
| // Unlike other properties, invalidation must always be set on layer_impl.
|
| // See PictureLayerImpl::PushPropertiesTo for more details.
|
| layer_impl->invalidation_.Clear();
|
| layer_impl->invalidation_.Swap(&pile_invalidation_);
|
| - layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
|
| + layer_impl->pile_ = PicturePileImpl::CreateFromOther(&pile_);
|
| }
|
|
|
| void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
|
| Layer::SetLayerTreeHost(host);
|
| if (host) {
|
| - pile_->SetMinContentsScale(host->settings().minimum_contents_scale);
|
| - pile_->SetTileGridSize(host->settings().default_tile_grid_size);
|
| - pile_->set_slow_down_raster_scale_factor(
|
| + pile_.SetMinContentsScale(host->settings().minimum_contents_scale);
|
| + pile_.SetTileGridSize(host->settings().default_tile_grid_size);
|
| + pile_.set_slow_down_raster_scale_factor(
|
| host->debug_state().slow_down_raster_scale_factor);
|
| - pile_->set_show_debug_picture_borders(
|
| + pile_.set_show_debug_picture_borders(
|
| host->debug_state().show_picture_borders);
|
| }
|
| }
|
| @@ -93,7 +92,7 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
|
| gfx::Size layer_size = paint_properties().bounds;
|
|
|
| if (last_updated_visible_content_rect_ == visible_content_rect() &&
|
| - pile_->tiling_size() == layer_size && pending_invalidation_.IsEmpty()) {
|
| + pile_.tiling_size() == layer_size && pending_invalidation_.IsEmpty()) {
|
| // Only early out if the visible content rect of this layer hasn't changed.
|
| return updated;
|
| }
|
| @@ -121,16 +120,16 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
|
| // for them.
|
| DCHECK(client_);
|
| updated |=
|
| - pile_->UpdateAndExpandInvalidation(client_,
|
| - &pile_invalidation_,
|
| - SafeOpaqueBackgroundColor(),
|
| - contents_opaque(),
|
| - client_->FillsBoundsCompletely(),
|
| - layer_size,
|
| - visible_layer_rect,
|
| - update_source_frame_number_,
|
| - Picture::RECORD_NORMALLY,
|
| - rendering_stats_instrumentation());
|
| + pile_.UpdateAndExpandInvalidation(client_,
|
| + &pile_invalidation_,
|
| + SafeOpaqueBackgroundColor(),
|
| + contents_opaque(),
|
| + client_->FillsBoundsCompletely(),
|
| + layer_size,
|
| + visible_layer_rect,
|
| + update_source_frame_number_,
|
| + Picture::RECORD_NORMALLY,
|
| + rendering_stats_instrumentation());
|
| last_updated_visible_content_rect_ = visible_content_rect();
|
|
|
| if (updated) {
|
| @@ -145,7 +144,7 @@ bool PictureLayer::Update(ResourceUpdateQueue* queue,
|
| }
|
|
|
| void PictureLayer::SetIsMask(bool is_mask) {
|
| - pile_->set_is_mask(is_mask);
|
| + pile_.set_is_mask(is_mask);
|
| }
|
|
|
| bool PictureLayer::SupportsLCDText() const {
|
| @@ -181,7 +180,7 @@ skia::RefPtr<SkPicture> PictureLayer::GetPicture() const {
|
| }
|
|
|
| bool PictureLayer::IsSuitableForGpuRasterization() const {
|
| - return pile_->is_suitable_for_gpu_rasterization();
|
| + return pile_.is_suitable_for_gpu_rasterization();
|
| }
|
|
|
| void PictureLayer::ClearClient() {
|
|
|