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 "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
9 #include "cc/debug/debug_colors.h" | 9 #include "cc/debug/debug_colors.h" |
10 #include "cc/debug/debug_rect_history.h" | 10 #include "cc/debug/debug_rect_history.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 | 107 |
108 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink, | 108 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink, |
109 AppendQuadsData* append_quads_data) { | 109 AppendQuadsData* append_quads_data) { |
110 if (!hud_texture_->id()) | 110 if (!hud_texture_->id()) |
111 return; | 111 return; |
112 | 112 |
113 SharedQuadState* shared_quad_state = | 113 SharedQuadState* shared_quad_state = |
114 quad_sink->UseSharedQuadState(CreateSharedQuadState()); | 114 quad_sink->UseSharedQuadState(CreateSharedQuadState()); |
115 | 115 |
116 gfx::Rect quad_rect(gfx::Point(), bounds()); | 116 gfx::Rect quad_rect(bounds()); |
117 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 117 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
118 bool premultiplied_alpha = true; | 118 bool premultiplied_alpha = true; |
119 gfx::PointF uv_top_left(0.f, 0.f); | 119 gfx::PointF uv_top_left(0.f, 0.f); |
120 gfx::PointF uv_bottom_right(1.f, 1.f); | 120 gfx::PointF uv_bottom_right(1.f, 1.f); |
121 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; | 121 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; |
122 bool flipped = false; | 122 bool flipped = false; |
123 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); | 123 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); |
124 quad->SetNew(shared_quad_state, | 124 quad->SetNew(shared_quad_state, |
125 quad_rect, | 125 quad_rect, |
126 opaque_rect, | 126 opaque_rect, |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 688 } |
689 | 689 |
690 canvas->restore(); | 690 canvas->restore(); |
691 } | 691 } |
692 | 692 |
693 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { | 693 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { |
694 return "HeadsUpDisplayLayer"; | 694 return "HeadsUpDisplayLayer"; |
695 } | 695 } |
696 | 696 |
697 } // namespace cc | 697 } // namespace cc |
OLD | NEW |