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/heads_up_display_layer_impl.h" | 5 #include "cc/layers/heads_up_display_layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 | 130 |
131 void HeadsUpDisplayLayerImpl::AppendQuads( | 131 void HeadsUpDisplayLayerImpl::AppendQuads( |
132 RenderPass* render_pass, | 132 RenderPass* render_pass, |
133 AppendQuadsData* append_quads_data) { | 133 AppendQuadsData* append_quads_data) { |
134 if (!resources_.back()->id()) | 134 if (!resources_.back()->id()) |
135 return; | 135 return; |
136 | 136 |
137 SharedQuadState* shared_quad_state = | 137 SharedQuadState* shared_quad_state = |
138 render_pass->CreateAndAppendSharedQuadState(); | 138 render_pass->CreateAndAppendSharedQuadState(); |
139 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_); | 139 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_, |
| 140 internal_contents_scale_); |
140 | 141 |
141 gfx::Rect quad_rect(internal_content_bounds_); | 142 gfx::Rect quad_rect(internal_content_bounds_); |
142 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 143 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
143 gfx::Rect visible_quad_rect(quad_rect); | 144 gfx::Rect visible_quad_rect(quad_rect); |
144 bool premultiplied_alpha = true; | 145 bool premultiplied_alpha = true; |
145 gfx::PointF uv_top_left(0.f, 0.f); | 146 gfx::PointF uv_top_left(0.f, 0.f); |
146 gfx::PointF uv_bottom_right(1.f, 1.f); | 147 gfx::PointF uv_bottom_right(1.f, 1.f); |
147 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; | 148 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; |
148 bool flipped = false; | 149 bool flipped = false; |
149 bool nearest_neighbor = false; | 150 bool nearest_neighbor = false; |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 return "cc::HeadsUpDisplayLayerImpl"; | 796 return "cc::HeadsUpDisplayLayerImpl"; |
796 } | 797 } |
797 | 798 |
798 void HeadsUpDisplayLayerImpl::AsValueInto( | 799 void HeadsUpDisplayLayerImpl::AsValueInto( |
799 base::trace_event::TracedValue* dict) const { | 800 base::trace_event::TracedValue* dict) const { |
800 LayerImpl::AsValueInto(dict); | 801 LayerImpl::AsValueInto(dict); |
801 dict->SetString("layer_name", "Heads Up Display Layer"); | 802 dict->SetString("layer_name", "Heads Up Display Layer"); |
802 } | 803 } |
803 | 804 |
804 } // namespace cc | 805 } // namespace cc |
OLD | NEW |