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

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

Issue 503953003: wip: not for commit (update twin relationship) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 DCHECK_EQ(layer_impl->bounds().ToString(), pile_->tiling_size().ToString()); 50 DCHECK_EQ(layer_impl->bounds().ToString(), pile_->tiling_size().ToString());
51 } 51 }
52 52
53 layer_impl->SetIsMask(is_mask_); 53 layer_impl->SetIsMask(is_mask_);
54 54
55 // Unlike other properties, invalidation must always be set on layer_impl. 55 // Unlike other properties, invalidation must always be set on layer_impl.
56 // See PictureLayerImpl::PushPropertiesTo for more details. 56 // See PictureLayerImpl::PushPropertiesTo for more details.
57 layer_impl->invalidation_.Clear(); 57 layer_impl->invalidation_.Clear();
58 layer_impl->invalidation_.Swap(&pile_invalidation_); 58 layer_impl->invalidation_.Swap(&pile_invalidation_);
59 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get()); 59 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
60
61 // Update the twin relationship as soon as possible.
62 layer_impl->UpdateTwinRelationship();
60 } 63 }
61 64
62 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 65 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
63 Layer::SetLayerTreeHost(host); 66 Layer::SetLayerTreeHost(host);
64 if (host) { 67 if (host) {
65 pile_->SetMinContentsScale(host->settings().minimum_contents_scale); 68 pile_->SetMinContentsScale(host->settings().minimum_contents_scale);
66 pile_->SetTileGridSize(host->settings().default_tile_size); 69 pile_->SetTileGridSize(host->settings().default_tile_size);
67 pile_->set_slow_down_raster_scale_factor( 70 pile_->set_slow_down_raster_scale_factor(
68 host->debug_state().slow_down_raster_scale_factor); 71 host->debug_state().slow_down_raster_scale_factor);
69 pile_->set_show_debug_picture_borders( 72 pile_->set_show_debug_picture_borders(
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 211
209 bool PictureLayer::HasDrawableContent() const { 212 bool PictureLayer::HasDrawableContent() const {
210 return client_ && Layer::HasDrawableContent(); 213 return client_ && Layer::HasDrawableContent();
211 } 214 }
212 215
213 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 216 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
214 benchmark->RunOnLayer(this); 217 benchmark->RunOnLayer(this);
215 } 218 }
216 219
217 } // namespace cc 220 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698