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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) | 124 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE) |
125 return false; | 125 return false; |
126 | 126 |
127 ReleaseUnmatchedSizeResources(resource_provider); | 127 ReleaseUnmatchedSizeResources(resource_provider); |
128 AcquireResource(resource_provider); | 128 AcquireResource(resource_provider); |
129 return LayerImpl::WillDraw(draw_mode, resource_provider); | 129 return LayerImpl::WillDraw(draw_mode, resource_provider); |
130 } | 130 } |
131 | 131 |
132 void HeadsUpDisplayLayerImpl::AppendQuads( | 132 void HeadsUpDisplayLayerImpl::AppendQuads( |
133 RenderPass* render_pass, | 133 RenderPass* render_pass, |
134 const OcclusionTracker<LayerImpl>& occlusion_tracker, | 134 const Occlusion& occlusion_in_content_space, |
135 AppendQuadsData* append_quads_data) { | 135 AppendQuadsData* append_quads_data) { |
136 if (!resources_.back()->id()) | 136 if (!resources_.back()->id()) |
137 return; | 137 return; |
138 | 138 |
139 SharedQuadState* shared_quad_state = | 139 SharedQuadState* shared_quad_state = |
140 render_pass->CreateAndAppendSharedQuadState(); | 140 render_pass->CreateAndAppendSharedQuadState(); |
141 PopulateSharedQuadState(shared_quad_state); | 141 PopulateSharedQuadState(shared_quad_state); |
142 | 142 |
143 gfx::Rect quad_rect(content_bounds()); | 143 gfx::Rect quad_rect(content_bounds()); |
144 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 144 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 return "cc::HeadsUpDisplayLayerImpl"; | 788 return "cc::HeadsUpDisplayLayerImpl"; |
789 } | 789 } |
790 | 790 |
791 void HeadsUpDisplayLayerImpl::AsValueInto( | 791 void HeadsUpDisplayLayerImpl::AsValueInto( |
792 base::debug::TracedValue* dict) const { | 792 base::debug::TracedValue* dict) const { |
793 LayerImpl::AsValueInto(dict); | 793 LayerImpl::AsValueInto(dict); |
794 dict->SetString("layer_name", "Heads Up Display Layer"); | 794 dict->SetString("layer_name", "Heads Up Display Layer"); |
795 } | 795 } |
796 | 796 |
797 } // namespace cc | 797 } // namespace cc |
OLD | NEW |