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

Side by Side Diff: cc/overdraw_metrics.cc

Issue 12648005: cc: Chromify the LayerTreeHostImpl class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compl 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 | Annotate | Revision Log
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | cc/picture_layer_impl_unittest.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/overdraw_metrics.h" 5 #include "cc/overdraw_metrics.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "cc/layer_tree_host.h" 9 #include "cc/layer_tree_host.h"
10 #include "cc/layer_tree_host_impl.h" 10 #include "cc/layer_tree_host_impl.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (record_metrics_for_frame_) { 144 if (record_metrics_for_frame_) {
145 RecordMetricsInternal<LayerTreeHostImpl>(DrawingToScreen, 145 RecordMetricsInternal<LayerTreeHostImpl>(DrawingToScreen,
146 layer_tree_host_impl); 146 layer_tree_host_impl);
147 } 147 }
148 } 148 }
149 149
150 static gfx::Size DeviceViewportSize(const LayerTreeHost* host) { 150 static gfx::Size DeviceViewportSize(const LayerTreeHost* host) {
151 return host->device_viewport_size(); 151 return host->device_viewport_size();
152 } 152 }
153 static gfx::Size DeviceViewportSize(const LayerTreeHostImpl* host_impl) { 153 static gfx::Size DeviceViewportSize(const LayerTreeHostImpl* host_impl) {
154 return host_impl->DeviceViewportSize(); 154 return host_impl->device_viewport_size();
155 } 155 }
156 156
157 template <typename LayerTreeHostType> 157 template <typename LayerTreeHostType>
158 void OverdrawMetrics::RecordMetricsInternal( 158 void OverdrawMetrics::RecordMetricsInternal(
159 MetricsType metrics_type, 159 MetricsType metrics_type,
160 const LayerTreeHostType* layer_tree_host) const { 160 const LayerTreeHostType* layer_tree_host) const {
161 // This gives approximately 10x the percentage of pixels to fill the viewport 161 // This gives approximately 10x the percentage of pixels to fill the viewport
162 // once. 162 // once.
163 float normalization = 1000.f / (DeviceViewportSize(layer_tree_host).width() * 163 float normalization = 1000.f / (DeviceViewportSize(layer_tree_host).width() *
164 DeviceViewportSize(layer_tree_host).height()); 164 DeviceViewportSize(layer_tree_host).height());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 contents_texture_use_bytes_, 258 contents_texture_use_bytes_,
259 "RenderSurfaceTextureBytes", 259 "RenderSurfaceTextureBytes",
260 render_surface_texture_use_bytes_); 260 render_surface_texture_use_bytes_);
261 } 261 }
262 break; 262 break;
263 } 263 }
264 } 264 }
265 } 265 }
266 266
267 } // namespace cc 267 } // namespace cc
OLDNEW
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | cc/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698