| 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/debug/overdraw_metrics.h" | 10 #include "cc/debug/overdraw_metrics.h" |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 401 } |
| 402 | 402 |
| 403 template <typename LayerType, typename RenderSurfaceType> | 403 template <typename LayerType, typename RenderSurfaceType> |
| 404 void OcclusionTrackerBase<LayerType, RenderSurfaceType>:: | 404 void OcclusionTrackerBase<LayerType, RenderSurfaceType>:: |
| 405 MarkOccludedBehindLayer(const LayerType* layer) { | 405 MarkOccludedBehindLayer(const LayerType* layer) { |
| 406 DCHECK(!stack_.empty()); | 406 DCHECK(!stack_.empty()); |
| 407 DCHECK_EQ(layer->render_target(), stack_.back().target); | 407 DCHECK_EQ(layer->render_target(), stack_.back().target); |
| 408 if (stack_.empty()) | 408 if (stack_.empty()) |
| 409 return; | 409 return; |
| 410 | 410 |
| 411 if (!layer->DrawsContent()) | 411 if (layer->draw_properties().skip_drawing) |
| 412 return; | 412 return; |
| 413 | 413 |
| 414 if (!LayerOpacityKnown(layer) || layer->draw_opacity() < 1) | 414 if (!LayerOpacityKnown(layer) || layer->draw_opacity() < 1) |
| 415 return; | 415 return; |
| 416 | 416 |
| 417 if (LayerIsInUnsorted3dRenderingContext(layer)) | 417 if (LayerIsInUnsorted3dRenderingContext(layer)) |
| 418 return; | 418 return; |
| 419 | 419 |
| 420 if (!LayerTransformsToTargetKnown(layer)) | 420 if (!LayerTransformsToTargetKnown(layer)) |
| 421 return; | 421 return; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 unoccluded_rect.Intersect(content_rect); | 678 unoccluded_rect.Intersect(content_rect); |
| 679 | 679 |
| 680 return unoccluded_rect; | 680 return unoccluded_rect; |
| 681 } | 681 } |
| 682 | 682 |
| 683 // Instantiate (and export) templates here for the linker. | 683 // Instantiate (and export) templates here for the linker. |
| 684 template class OcclusionTrackerBase<Layer, RenderSurface>; | 684 template class OcclusionTrackerBase<Layer, RenderSurface>; |
| 685 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; | 685 template class OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>; |
| 686 | 686 |
| 687 } // namespace cc | 687 } // namespace cc |
| OLD | NEW |