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/solid_color_layer_impl.h" | 5 #include "cc/layers/solid_color_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 SolidColorDrawQuad* quad = | 57 SolidColorDrawQuad* quad = |
58 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 58 render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
59 quad->SetNew( | 59 quad->SetNew( |
60 shared_quad_state, quad_rect, visible_quad_rect, color, false); | 60 shared_quad_state, quad_rect, visible_quad_rect, color, false); |
61 } | 61 } |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 void SolidColorLayerImpl::AppendQuads( | 65 void SolidColorLayerImpl::AppendQuads( |
66 RenderPass* render_pass, | 66 RenderPass* render_pass, |
67 const Occlusion& occlusion_in_content_space, | |
68 AppendQuadsData* append_quads_data) { | 67 AppendQuadsData* append_quads_data) { |
69 SharedQuadState* shared_quad_state = | 68 SharedQuadState* shared_quad_state = |
70 render_pass->CreateAndAppendSharedQuadState(); | 69 render_pass->CreateAndAppendSharedQuadState(); |
71 PopulateSharedQuadState(shared_quad_state); | 70 PopulateSharedQuadState(shared_quad_state); |
72 | 71 |
73 AppendDebugBorderQuad( | 72 AppendDebugBorderQuad( |
74 render_pass, content_bounds(), shared_quad_state, append_quads_data); | 73 render_pass, content_bounds(), shared_quad_state, append_quads_data); |
75 | 74 |
76 // TODO(hendrikw): We need to pass the visible content rect rather than | 75 // TODO(hendrikw): We need to pass the visible content rect rather than |
77 // |content_bounds()| here. | 76 // |content_bounds()| here. |
78 AppendSolidQuads(render_pass, | 77 AppendSolidQuads(render_pass, draw_properties().occlusion_in_content_space, |
79 occlusion_in_content_space, | 78 shared_quad_state, gfx::Rect(content_bounds()), |
80 shared_quad_state, | 79 background_color(), append_quads_data); |
81 gfx::Rect(content_bounds()), | |
82 background_color(), | |
83 append_quads_data); | |
84 } | 80 } |
85 | 81 |
86 const char* SolidColorLayerImpl::LayerTypeAsString() const { | 82 const char* SolidColorLayerImpl::LayerTypeAsString() const { |
87 return "cc::SolidColorLayerImpl"; | 83 return "cc::SolidColorLayerImpl"; |
88 } | 84 } |
89 | 85 |
90 } // namespace cc | 86 } // namespace cc |
OLD | NEW |