| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 internal_content_bounds_ = | 130 internal_content_bounds_ = |
| 131 gfx::ToCeiledSize(gfx::ScaleSize(bounds(), internal_contents_scale_)); | 131 gfx::ToCeiledSize(gfx::ScaleSize(bounds(), internal_contents_scale_)); |
| 132 | 132 |
| 133 ReleaseUnmatchedSizeResources(resource_provider); | 133 ReleaseUnmatchedSizeResources(resource_provider); |
| 134 AcquireResource(resource_provider); | 134 AcquireResource(resource_provider); |
| 135 return LayerImpl::WillDraw(draw_mode, resource_provider); | 135 return LayerImpl::WillDraw(draw_mode, resource_provider); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void HeadsUpDisplayLayerImpl::AppendQuads( | 138 void HeadsUpDisplayLayerImpl::AppendQuads( |
| 139 RenderPass* render_pass, | 139 RenderPass* render_pass, |
| 140 const Occlusion& occlusion_in_content_space, | |
| 141 AppendQuadsData* append_quads_data) { | 140 AppendQuadsData* append_quads_data) { |
| 142 if (!resources_.back()->id()) | 141 if (!resources_.back()->id()) |
| 143 return; | 142 return; |
| 144 | 143 |
| 145 SharedQuadState* shared_quad_state = | 144 SharedQuadState* shared_quad_state = |
| 146 render_pass->CreateAndAppendSharedQuadState(); | 145 render_pass->CreateAndAppendSharedQuadState(); |
| 147 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_); | 146 PopulateScaledSharedQuadState(shared_quad_state, internal_contents_scale_); |
| 148 | 147 |
| 149 gfx::Rect quad_rect(internal_content_bounds_); | 148 gfx::Rect quad_rect(internal_content_bounds_); |
| 150 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 149 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 return "cc::HeadsUpDisplayLayerImpl"; | 835 return "cc::HeadsUpDisplayLayerImpl"; |
| 837 } | 836 } |
| 838 | 837 |
| 839 void HeadsUpDisplayLayerImpl::AsValueInto( | 838 void HeadsUpDisplayLayerImpl::AsValueInto( |
| 840 base::trace_event::TracedValue* dict) const { | 839 base::trace_event::TracedValue* dict) const { |
| 841 LayerImpl::AsValueInto(dict); | 840 LayerImpl::AsValueInto(dict); |
| 842 dict->SetString("layer_name", "Heads Up Display Layer"); | 841 dict->SetString("layer_name", "Heads Up Display Layer"); |
| 843 } | 842 } |
| 844 | 843 |
| 845 } // namespace cc | 844 } // namespace cc |
| OLD | NEW |