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

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

Issue 12426024: cc: Switch RenderingStats collection in Layer::Update() to RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 190965 Created 7 years, 9 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/heads_up_display_layer.h ('k') | cc/layers/image_layer.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/heads_up_display_layer.h" 5 #include "cc/layers/heads_up_display_layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/layers/heads_up_display_layer_impl.h" 10 #include "cc/layers/heads_up_display_layer_impl.h"
11 #include "cc/trees/layer_tree_host.h" 11 #include "cc/trees/layer_tree_host.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() { 15 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
16 return make_scoped_refptr(new HeadsUpDisplayLayer()); 16 return make_scoped_refptr(new HeadsUpDisplayLayer());
17 } 17 }
18 18
19 HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() { 19 HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() {
20 SetBounds(gfx::Size(256, 256)); 20 SetBounds(gfx::Size(256, 256));
21 } 21 }
22 22
23 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {} 23 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
24 24
25 void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*, 25 void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*,
26 const OcclusionTracker*, 26 const OcclusionTracker*) {
27 RenderingStats*) {
28 const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state(); 27 const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state();
29 int max_texture_size = 28 int max_texture_size =
30 layer_tree_host()->GetRendererCapabilities().max_texture_size; 29 layer_tree_host()->GetRendererCapabilities().max_texture_size;
31 30
32 int device_viewport_in_layout_pixels_width = 31 int device_viewport_in_layout_pixels_width =
33 layer_tree_host()->device_viewport_size().width() / 32 layer_tree_host()->device_viewport_size().width() /
34 layer_tree_host()->device_scale_factor(); 33 layer_tree_host()->device_scale_factor();
35 int device_viewport_in_layout_pixels_height = 34 int device_viewport_in_layout_pixels_height =
36 layer_tree_host()->device_viewport_size().height() / 35 layer_tree_host()->device_viewport_size().height() /
37 layer_tree_host()->device_scale_factor(); 36 layer_tree_host()->device_scale_factor();
(...skipping 19 matching lines...) Expand all
57 56
58 bool HeadsUpDisplayLayer::DrawsContent() const { return true; } 57 bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
59 58
60 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( 59 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
61 LayerTreeImpl* tree_impl) { 60 LayerTreeImpl* tree_impl) {
62 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_). 61 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_).
63 PassAs<LayerImpl>(); 62 PassAs<LayerImpl>();
64 } 63 }
65 64
66 } // namespace cc 65 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/image_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698