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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 605773004: CC: Tile-size cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "cc/layers/content_layer_client.h" 8 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/trees/layer_tree_impl.h" 10 #include "cc/trees/layer_tree_impl.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // See PictureLayerImpl::PushPropertiesTo for more details. 53 // See PictureLayerImpl::PushPropertiesTo for more details.
54 layer_impl->invalidation_.Clear(); 54 layer_impl->invalidation_.Clear();
55 layer_impl->invalidation_.Swap(&pile_invalidation_); 55 layer_impl->invalidation_.Swap(&pile_invalidation_);
56 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get()); 56 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
57 } 57 }
58 58
59 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 59 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
60 Layer::SetLayerTreeHost(host); 60 Layer::SetLayerTreeHost(host);
61 if (host) { 61 if (host) {
62 pile_->SetMinContentsScale(host->settings().minimum_contents_scale); 62 pile_->SetMinContentsScale(host->settings().minimum_contents_scale);
63 pile_->SetTileGridSize(host->settings().default_tile_size); 63 pile_->SetTileGridSize(host->settings().default_tile_grid_size);
64 pile_->set_slow_down_raster_scale_factor( 64 pile_->set_slow_down_raster_scale_factor(
65 host->debug_state().slow_down_raster_scale_factor); 65 host->debug_state().slow_down_raster_scale_factor);
66 pile_->set_show_debug_picture_borders( 66 pile_->set_show_debug_picture_borders(
67 host->debug_state().show_picture_borders); 67 host->debug_state().show_picture_borders);
68 } 68 }
69 } 69 }
70 70
71 void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) { 71 void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) {
72 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect); 72 gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
73 if (!rect.IsEmpty()) { 73 if (!rect.IsEmpty()) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 bool PictureLayer::HasDrawableContent() const { 204 bool PictureLayer::HasDrawableContent() const {
205 return client_ && Layer::HasDrawableContent(); 205 return client_ && Layer::HasDrawableContent();
206 } 206 }
207 207
208 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 208 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
209 benchmark->RunOnLayer(this); 209 benchmark->RunOnLayer(this);
210 } 210 }
211 211
212 } // namespace cc 212 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698