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

Side by Side Diff: cc/occlusion_tracker.cc

Issue 12728002: cc: Chromify the OverdrawMetrics class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/layer_tree_host_impl.cc ('k') | cc/overdraw_metrics.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/occlusion_tracker.h" 5 #include "cc/occlusion_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/layer.h" 9 #include "cc/layer.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
11 #include "cc/math_util.h" 11 #include "cc/math_util.h"
12 #include "cc/overdraw_metrics.h" 12 #include "cc/overdraw_metrics.h"
13 #include "ui/gfx/quad_f.h" 13 #include "ui/gfx/quad_f.h"
14 #include "ui/gfx/rect_conversions.h" 14 #include "ui/gfx/rect_conversions.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 template <typename LayerType, typename RenderSurfaceType> 18 template <typename LayerType, typename RenderSurfaceType>
19 OcclusionTrackerBase<LayerType, RenderSurfaceType>::OcclusionTrackerBase( 19 OcclusionTrackerBase<LayerType, RenderSurfaceType>::OcclusionTrackerBase(
20 gfx::Rect screen_space_clip_rect, bool record_metrics_for_frame) 20 gfx::Rect screen_space_clip_rect, bool record_metrics_for_frame)
21 : screen_space_clip_rect_(screen_space_clip_rect), 21 : screen_space_clip_rect_(screen_space_clip_rect),
22 overdraw_metrics_(OverdrawMetrics::create(record_metrics_for_frame)), 22 overdraw_metrics_(OverdrawMetrics::Create(record_metrics_for_frame)),
23 occluding_screen_space_rects_(NULL), 23 occluding_screen_space_rects_(NULL),
24 non_occluding_screen_space_rects_(NULL) {} 24 non_occluding_screen_space_rects_(NULL) {}
25 25
26 template <typename LayerType, typename RenderSurfaceType> 26 template <typename LayerType, typename RenderSurfaceType>
27 OcclusionTrackerBase<LayerType, RenderSurfaceType>::~OcclusionTrackerBase() {} 27 OcclusionTrackerBase<LayerType, RenderSurfaceType>::~OcclusionTrackerBase() {}
28 28
29 template <typename LayerType, typename RenderSurfaceType> 29 template <typename LayerType, typename RenderSurfaceType>
30 void OcclusionTrackerBase<LayerType, RenderSurfaceType>::EnterLayer( 30 void OcclusionTrackerBase<LayerType, RenderSurfaceType>::EnterLayer(
31 const LayerIteratorPosition<LayerType>& layer_iterator) { 31 const LayerIteratorPosition<LayerType>& layer_iterator) {
32 LayerType* render_target = layer_iterator.targetRenderSurfaceLayer; 32 LayerType* render_target = layer_iterator.targetRenderSurfaceLayer;
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 709 }
710 710
711 return unoccluded_rect; 711 return unoccluded_rect;
712 } 712 }
713 713
714 // Instantiate (and export) templates here for the linker. 714 // Instantiate (and export) templates here for the linker.
715 template class OcclusionTrackerBase<Layer, RenderSurface>; 715 template class OcclusionTrackerBase<Layer, RenderSurface>;
716 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; 716 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>;
717 717
718 } // namespace cc 718 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/overdraw_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698