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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « cc/layers/nine_patch_layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // If update called, then pile size must match bounds pushed to impl layer. 44 // If update called, then pile size must match bounds pushed to impl layer.
45 DCHECK_IMPLIES( 45 DCHECK_IMPLIES(
46 update_source_frame_number_ == layer_tree_host()->source_frame_number(), 46 update_source_frame_number_ == layer_tree_host()->source_frame_number(),
47 layer_impl->bounds().ToString() == pile_.tiling_size().ToString()); 47 layer_impl->bounds().ToString() == pile_.tiling_size().ToString());
48 } 48 }
49 49
50 // Unlike other properties, invalidation must always be set on layer_impl. 50 // Unlike other properties, invalidation must always be set on layer_impl.
51 // See PictureLayerImpl::PushPropertiesTo for more details. 51 // See PictureLayerImpl::PushPropertiesTo for more details.
52 layer_impl->invalidation_.Clear(); 52 layer_impl->invalidation_.Clear();
53 layer_impl->invalidation_.Swap(&pile_invalidation_); 53 layer_impl->invalidation_.Swap(&pile_invalidation_);
54 layer_impl->pile_ = PicturePileImpl::CreateFromOther(&pile_); 54 layer_impl->UpdatePile(PicturePileImpl::CreateFromOther(&pile_));
55 } 55 }
56 56
57 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 57 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
58 Layer::SetLayerTreeHost(host); 58 Layer::SetLayerTreeHost(host);
59 if (host) { 59 if (host) {
60 pile_.SetMinContentsScale(host->settings().minimum_contents_scale); 60 pile_.SetMinContentsScale(host->settings().minimum_contents_scale);
61 pile_.SetTileGridSize(host->settings().default_tile_grid_size); 61 pile_.SetTileGridSize(host->settings().default_tile_grid_size);
62 pile_.set_slow_down_raster_scale_factor( 62 pile_.set_slow_down_raster_scale_factor(
63 host->debug_state().slow_down_raster_scale_factor); 63 host->debug_state().slow_down_raster_scale_factor);
64 pile_.set_show_debug_picture_borders( 64 pile_.set_show_debug_picture_borders(
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 bool PictureLayer::HasDrawableContent() const { 190 bool PictureLayer::HasDrawableContent() const {
191 return client_ && Layer::HasDrawableContent(); 191 return client_ && Layer::HasDrawableContent();
192 } 192 }
193 193
194 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 194 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
195 benchmark->RunOnLayer(this); 195 benchmark->RunOnLayer(this);
196 } 196 }
197 197
198 } // namespace cc 198 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698