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

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

Issue 809433003: cc: Make the PictureLayerImpl raster source null until commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullrastersource: . Created 6 years 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') | 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/resources/display_list_recording_source.h" 10 #include "cc/resources/display_list_recording_source.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { 39 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
40 return PictureLayerImpl::Create(tree_impl, id(), is_mask_); 40 return PictureLayerImpl::Create(tree_impl, id(), is_mask_);
41 } 41 }
42 42
43 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { 43 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
44 Layer::PushPropertiesTo(base_layer); 44 Layer::PushPropertiesTo(base_layer);
45 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 45 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
46 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. 46 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer.
47 DCHECK_EQ(layer_impl->is_mask_, is_mask_); 47 DCHECK_EQ(layer_impl->is_mask(), is_mask_);
48 48
49 int source_frame_number = layer_tree_host()->source_frame_number(); 49 int source_frame_number = layer_tree_host()->source_frame_number();
50 gfx::Size impl_bounds = layer_impl->bounds(); 50 gfx::Size impl_bounds = layer_impl->bounds();
51 gfx::Size recording_source_bounds = recording_source_->GetSize(); 51 gfx::Size recording_source_bounds = recording_source_->GetSize();
52 52
53 // If update called, then recording source size must match bounds pushed to 53 // If update called, then recording source size must match bounds pushed to
54 // impl layer. 54 // impl layer.
55 DCHECK_IMPLIES(update_source_frame_number_ == source_frame_number, 55 DCHECK_IMPLIES(update_source_frame_number_ == source_frame_number,
56 impl_bounds == recording_source_bounds) 56 impl_bounds == recording_source_bounds)
57 << " bounds " << impl_bounds.ToString() << " recording source " 57 << " bounds " << impl_bounds.ToString() << " recording source "
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 bool PictureLayer::HasDrawableContent() const { 208 bool PictureLayer::HasDrawableContent() const {
209 return client_ && Layer::HasDrawableContent(); 209 return client_ && Layer::HasDrawableContent();
210 } 210 }
211 211
212 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 212 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
213 benchmark->RunOnLayer(this); 213 benchmark->RunOnLayer(this);
214 } 214 }
215 215
216 } // namespace cc 216 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698