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/layers/io_surface_layer_impl.h" | 5 #include "cc/layers/io_surface_layer_impl.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "cc/output/gl_renderer.h" // For the GLC() macro. | 8 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
9 #include "cc/output/output_surface.h" | 9 #include "cc/output/output_surface.h" |
10 #include "cc/quads/io_surface_draw_quad.h" | 10 #include "cc/quads/io_surface_draw_quad.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 AppendQuadsData* append_quads_data) { | 70 AppendQuadsData* append_quads_data) { |
71 SharedQuadState* shared_quad_state = | 71 SharedQuadState* shared_quad_state = |
72 render_pass->CreateAndAppendSharedQuadState(); | 72 render_pass->CreateAndAppendSharedQuadState(); |
73 PopulateSharedQuadState(shared_quad_state); | 73 PopulateSharedQuadState(shared_quad_state); |
74 | 74 |
75 AppendDebugBorderQuad( | 75 AppendDebugBorderQuad( |
76 render_pass, content_bounds(), shared_quad_state, append_quads_data); | 76 render_pass, content_bounds(), shared_quad_state, append_quads_data); |
77 | 77 |
78 gfx::Rect quad_rect(content_bounds()); | 78 gfx::Rect quad_rect(content_bounds()); |
79 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 79 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
80 gfx::Rect visible_quad_rect = occlusion_tracker.UnoccludedContentRect( | 80 gfx::Rect visible_quad_rect = |
81 quad_rect, draw_properties().target_space_transform); | 81 occlusion_tracker.GetCurrentOcclusionForLayer( |
| 82 draw_properties().target_space_transform) |
| 83 .GetUnoccludedContentRect(quad_rect); |
82 if (visible_quad_rect.IsEmpty()) | 84 if (visible_quad_rect.IsEmpty()) |
83 return; | 85 return; |
84 | 86 |
85 IOSurfaceDrawQuad* quad = | 87 IOSurfaceDrawQuad* quad = |
86 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); | 88 render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>(); |
87 quad->SetNew(shared_quad_state, | 89 quad->SetNew(shared_quad_state, |
88 quad_rect, | 90 quad_rect, |
89 opaque_rect, | 91 opaque_rect, |
90 visible_quad_rect, | 92 visible_quad_rect, |
91 io_surface_size_, | 93 io_surface_size_, |
(...skipping 15 matching lines...) Expand all Loading... |
107 | 109 |
108 io_surface_id_ = io_surface_id; | 110 io_surface_id_ = io_surface_id; |
109 io_surface_size_ = size; | 111 io_surface_size_ = size; |
110 } | 112 } |
111 | 113 |
112 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 114 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
113 return "cc::IOSurfaceLayerImpl"; | 115 return "cc::IOSurfaceLayerImpl"; |
114 } | 116 } |
115 | 117 |
116 } // namespace cc | 118 } // namespace cc |
OLD | NEW |