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

Side by Side Diff: cc/trees/occlusion_tracker.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 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/trees/layer_tree_settings.cc ('k') | cc/trees/occlusion_tracker_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/trees/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/base/region.h" 10 #include "cc/base/region.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return !rs->screen_space_transforms_are_animating(); 148 return !rs->screen_space_transforms_are_animating();
149 } 149 }
150 static inline bool SurfaceTransformsToScreenKnown(const RenderSurfaceImpl* rs) { 150 static inline bool SurfaceTransformsToScreenKnown(const RenderSurfaceImpl* rs) {
151 return true; 151 return true;
152 } 152 }
153 153
154 static inline bool LayerIsInUnsorted3dRenderingContext(const Layer* layer) { 154 static inline bool LayerIsInUnsorted3dRenderingContext(const Layer* layer) {
155 return layer->Is3dSorted(); 155 return layer->Is3dSorted();
156 } 156 }
157 static inline bool LayerIsInUnsorted3dRenderingContext(const LayerImpl* layer) { 157 static inline bool LayerIsInUnsorted3dRenderingContext(const LayerImpl* layer) {
158 return false; 158 return layer->Is3dSorted();
159 } 159 }
160 160
161 template <typename LayerType> 161 template <typename LayerType>
162 static inline bool LayerIsHidden(const LayerType* layer) { 162 static inline bool LayerIsHidden(const LayerType* layer) {
163 return layer->hide_layer_and_subtree() || 163 return layer->hide_layer_and_subtree() ||
164 (layer->parent() && LayerIsHidden(layer->parent())); 164 (layer->parent() && LayerIsHidden(layer->parent()));
165 } 165 }
166 166
167 template <typename LayerType> 167 template <typename LayerType>
168 void OcclusionTracker<LayerType>::EnterRenderTarget( 168 void OcclusionTracker<LayerType>::EnterRenderTarget(
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 for (size_t i = 0; i < occluded.GetRegionComplexity(); ++i) 477 for (size_t i = 0; i < occluded.GetRegionComplexity(); ++i)
478 visible_region.Subtract(occluded.GetRect(i)); 478 visible_region.Subtract(occluded.GetRect(i));
479 return visible_region; 479 return visible_region;
480 } 480 }
481 481
482 // Instantiate (and export) templates here for the linker. 482 // Instantiate (and export) templates here for the linker.
483 template class OcclusionTracker<Layer>; 483 template class OcclusionTracker<Layer>;
484 template class OcclusionTracker<LayerImpl>; 484 template class OcclusionTracker<LayerImpl>;
485 485
486 } // namespace cc 486 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | cc/trees/occlusion_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698