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

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

Issue 1586343003: cc: Add some tracing below LayerTreeHost::PushProperties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/surface_layer.cc » ('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 "base/trace_event/trace_event.h"
8 #include "cc/layers/content_layer_client.h" 9 #include "cc/layers/content_layer_client.h"
9 #include "cc/layers/picture_layer_impl.h" 10 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/playback/display_list_recording_source.h" 11 #include "cc/playback/display_list_recording_source.h"
11 #include "cc/proto/cc_conversions.h" 12 #include "cc/proto/cc_conversions.h"
12 #include "cc/proto/gfx_conversions.h" 13 #include "cc/proto/gfx_conversions.h"
13 #include "cc/proto/layer.pb.h" 14 #include "cc/proto/layer.pb.h"
14 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
15 #include "cc/trees/layer_tree_impl.h" 16 #include "cc/trees/layer_tree_impl.h"
16 #include "third_party/skia/include/core/SkPictureRecorder.h" 17 #include "third_party/skia/include/core/SkPictureRecorder.h"
17 #include "ui/gfx/geometry/rect_conversions.h" 18 #include "ui/gfx/geometry/rect_conversions.h"
(...skipping 25 matching lines...) Expand all
43 PictureLayer::~PictureLayer() { 44 PictureLayer::~PictureLayer() {
44 } 45 }
45 46
46 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { 47 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
47 return PictureLayerImpl::Create(tree_impl, id(), is_mask_, 48 return PictureLayerImpl::Create(tree_impl, id(), is_mask_,
48 new LayerImpl::SyncedScrollOffset); 49 new LayerImpl::SyncedScrollOffset);
49 } 50 }
50 51
51 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { 52 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
52 Layer::PushPropertiesTo(base_layer); 53 Layer::PushPropertiesTo(base_layer);
54 TRACE_EVENT0("cc", "PictureLayer::PushPropertiesTo");
53 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); 55 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
54 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. 56 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer.
55 DCHECK_EQ(layer_impl->is_mask(), is_mask_); 57 DCHECK_EQ(layer_impl->is_mask(), is_mask_);
56 DropRecordingSourceContentIfInvalid(); 58 DropRecordingSourceContentIfInvalid();
57 59
58 layer_impl->SetNearestNeighbor(nearest_neighbor_); 60 layer_impl->SetNearestNeighbor(nearest_neighbor_);
59 61
60 // Preserve lcd text settings from the current raster source. 62 // Preserve lcd text settings from the current raster source.
61 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText(); 63 bool can_use_lcd_text = layer_impl->RasterSourceUsesLCDText();
62 scoped_refptr<DisplayListRasterSource> raster_source = 64 scoped_refptr<DisplayListRasterSource> raster_source =
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (update_source_frame_number_ != source_frame_number && 245 if (update_source_frame_number_ != source_frame_number &&
244 recording_source_bounds != layer_bounds) { 246 recording_source_bounds != layer_bounds) {
245 // Update may not get called for the layer (if it's not in the viewport 247 // Update may not get called for the layer (if it's not in the viewport
246 // for example), even though it has resized making the recording source no 248 // for example), even though it has resized making the recording source no
247 // longer valid. In this case just destroy the recording source. 249 // longer valid. In this case just destroy the recording source.
248 recording_source_->SetEmptyBounds(); 250 recording_source_->SetEmptyBounds();
249 } 251 }
250 } 252 }
251 253
252 } // namespace cc 254 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/painted_scrollbar_layer.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698