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

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

Issue 270823003: cc: Move gpu rasterization flag from LayerImpl to LayerTreeImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
« 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 "cc/layers/content_layer_client.h" 7 #include "cc/layers/content_layer_client.h"
8 #include "cc/layers/picture_layer_impl.h" 8 #include "cc/layers/picture_layer_impl.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 #include "third_party/skia/include/core/SkPictureRecorder.h" 10 #include "third_party/skia/include/core/SkPictureRecorder.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } else if (update_source_frame_number_ == 46 } else if (update_source_frame_number_ ==
47 layer_tree_host()->source_frame_number()) { 47 layer_tree_host()->source_frame_number()) {
48 // TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect 48 // TODO(ernstm): This DCHECK is only valid as long as the pile's tiling_rect
49 // is identical to the layer_rect. 49 // is identical to the layer_rect.
50 // If update called, then pile size must match bounds pushed to impl layer. 50 // If update called, then pile size must match bounds pushed to impl layer.
51 DCHECK_EQ(layer_impl->bounds().ToString(), 51 DCHECK_EQ(layer_impl->bounds().ToString(),
52 pile_->tiling_rect().size().ToString()); 52 pile_->tiling_rect().size().ToString());
53 } 53 }
54 54
55 layer_impl->SetIsMask(is_mask_); 55 layer_impl->SetIsMask(is_mask_);
56 layer_impl->SetUseGpuRasterization(layer_tree_host()->UseGpuRasterization());
57 56
58 // Unlike other properties, invalidation must always be set on layer_impl. 57 // Unlike other properties, invalidation must always be set on layer_impl.
59 // See PictureLayerImpl::PushPropertiesTo for more details. 58 // See PictureLayerImpl::PushPropertiesTo for more details.
60 layer_impl->invalidation_.Clear(); 59 layer_impl->invalidation_.Clear();
61 layer_impl->invalidation_.Swap(&pile_invalidation_); 60 layer_impl->invalidation_.Swap(&pile_invalidation_);
62 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get()); 61 layer_impl->pile_ = PicturePileImpl::CreateFromOther(pile_.get());
63 } 62 }
64 63
65 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) { 64 void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
66 Layer::SetLayerTreeHost(host); 65 Layer::SetLayerTreeHost(host);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 180
182 bool PictureLayer::IsSuitableForGpuRasterization() const { 181 bool PictureLayer::IsSuitableForGpuRasterization() const {
183 return pile_->is_suitable_for_gpu_rasterization(); 182 return pile_->is_suitable_for_gpu_rasterization();
184 } 183 }
185 184
186 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 185 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
187 benchmark->RunOnLayer(this); 186 benchmark->RunOnLayer(this);
188 } 187 }
189 188
190 } // namespace cc 189 } // 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