| OLD | NEW |
| 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/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 return true; | 124 return true; |
| 125 } | 125 } |
| 126 static inline bool SurfaceTransformsToScreenKnown(const RenderSurface* rs) { | 126 static inline bool SurfaceTransformsToScreenKnown(const RenderSurface* rs) { |
| 127 return !rs->screen_space_transforms_are_animating(); | 127 return !rs->screen_space_transforms_are_animating(); |
| 128 } | 128 } |
| 129 static inline bool SurfaceTransformsToScreenKnown(const RenderSurfaceImpl* rs) { | 129 static inline bool SurfaceTransformsToScreenKnown(const RenderSurfaceImpl* rs) { |
| 130 return true; | 130 return true; |
| 131 } | 131 } |
| 132 | 132 |
| 133 static inline bool LayerIsInUnsorted3dRenderingContext(const Layer* layer) { | 133 static inline bool LayerIsInUnsorted3dRenderingContext(const Layer* layer) { |
| 134 return layer->is_3d_sorted(); | 134 return layer->Is3dSorted(); |
| 135 } | 135 } |
| 136 static inline bool LayerIsInUnsorted3dRenderingContext(const LayerImpl* layer) { | 136 static inline bool LayerIsInUnsorted3dRenderingContext(const LayerImpl* layer) { |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 | 139 |
| 140 template <typename LayerType> | 140 template <typename LayerType> |
| 141 static inline bool LayerIsHidden(const LayerType* layer) { | 141 static inline bool LayerIsHidden(const LayerType* layer) { |
| 142 return layer->hide_layer_and_subtree() || | 142 return layer->hide_layer_and_subtree() || |
| 143 (layer->parent() && LayerIsHidden(layer->parent())); | 143 (layer->parent() && LayerIsHidden(layer->parent())); |
| 144 } | 144 } |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 unoccluded_rect.Intersect(content_rect); | 639 unoccluded_rect.Intersect(content_rect); |
| 640 | 640 |
| 641 return unoccluded_rect; | 641 return unoccluded_rect; |
| 642 } | 642 } |
| 643 | 643 |
| 644 // Instantiate (and export) templates here for the linker. | 644 // Instantiate (and export) templates here for the linker. |
| 645 template class OcclusionTracker<Layer>; | 645 template class OcclusionTracker<Layer>; |
| 646 template class OcclusionTracker<LayerImpl>; | 646 template class OcclusionTracker<LayerImpl>; |
| 647 | 647 |
| 648 } // namespace cc | 648 } // namespace cc |
| OLD | NEW |