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

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 190697 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
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 "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/layers/heads_up_display_layer_impl.h" 8 #include "cc/layers/heads_up_display_layer_impl.h"
9 #include "cc/trees/layer_tree_host.h" 9 #include "cc/trees/layer_tree_host.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() { 13 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
14 return make_scoped_refptr(new HeadsUpDisplayLayer()); 14 return make_scoped_refptr(new HeadsUpDisplayLayer());
15 } 15 }
16 16
17 HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() { 17 HeadsUpDisplayLayer::HeadsUpDisplayLayer() : Layer() {
18 SetBounds(gfx::Size(256, 256)); 18 SetBounds(gfx::Size(256, 256));
19 } 19 }
20 20
21 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {} 21 HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
22 22
23 void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*, 23 void HeadsUpDisplayLayer::Update(ResourceUpdateQueue*,
24 const OcclusionTracker*, 24 const OcclusionTracker*) {
25 RenderingStats*) {
26 const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state(); 25 const LayerTreeDebugState& debug_state = layer_tree_host()->debug_state();
27 int max_texture_size = 26 int max_texture_size =
28 layer_tree_host()->GetRendererCapabilities().max_texture_size; 27 layer_tree_host()->GetRendererCapabilities().max_texture_size;
29 28
30 int device_viewport_in_layout_pixels_width = 29 int device_viewport_in_layout_pixels_width =
31 layer_tree_host()->device_viewport_size().width() / 30 layer_tree_host()->device_viewport_size().width() /
32 layer_tree_host()->device_scale_factor(); 31 layer_tree_host()->device_scale_factor();
33 int device_viewport_in_layout_pixels_height = 32 int device_viewport_in_layout_pixels_height =
34 layer_tree_host()->device_viewport_size().height() / 33 layer_tree_host()->device_viewport_size().height() /
35 layer_tree_host()->device_scale_factor(); 34 layer_tree_host()->device_scale_factor();
(...skipping 19 matching lines...) Expand all
55 54
56 bool HeadsUpDisplayLayer::DrawsContent() const { return true; } 55 bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
57 56
58 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( 57 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
59 LayerTreeImpl* tree_impl) { 58 LayerTreeImpl* tree_impl) {
60 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_). 59 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_).
61 PassAs<LayerImpl>(); 60 PassAs<LayerImpl>();
62 } 61 }
63 62
64 } // namespace cc 63 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/image_layer.h » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698