| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; | 117 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; |
| 118 bool flipped = false; | 118 bool flipped = false; |
| 119 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); | 119 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); |
| 120 quad->SetNew(shared_quad_state, | 120 quad->SetNew(shared_quad_state, |
| 121 quad_rect, | 121 quad_rect, |
| 122 opaque_rect, | 122 opaque_rect, |
| 123 hud_resource_->id(), | 123 hud_resource_->id(), |
| 124 premultiplied_alpha, | 124 premultiplied_alpha, |
| 125 uv_top_left, | 125 uv_top_left, |
| 126 uv_bottom_right, | 126 uv_bottom_right, |
| 127 SK_ColorTRANSPARENT, |
| 127 vertex_opacity, | 128 vertex_opacity, |
| 128 flipped); | 129 flipped); |
| 129 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); | 130 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); |
| 130 } | 131 } |
| 131 | 132 |
| 132 void HeadsUpDisplayLayerImpl::UpdateHudTexture( | 133 void HeadsUpDisplayLayerImpl::UpdateHudTexture( |
| 133 ResourceProvider* resource_provider) { | 134 ResourceProvider* resource_provider) { |
| 134 if (!hud_resource_->id()) | 135 if (!hud_resource_->id()) |
| 135 return; | 136 return; |
| 136 | 137 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 canvas->restore(); | 687 canvas->restore(); |
| 687 } | 688 } |
| 688 } | 689 } |
| 689 } | 690 } |
| 690 | 691 |
| 691 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { | 692 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { |
| 692 return "cc::HeadsUpDisplayLayerImpl"; | 693 return "cc::HeadsUpDisplayLayerImpl"; |
| 693 } | 694 } |
| 694 | 695 |
| 695 } // namespace cc | 696 } // namespace cc |
| OLD | NEW |