| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/output/overlay_strategy_underlay.h" | 5 #include "cc/output/overlay_strategy_underlay.h" |
| 6 | 6 |
| 7 #include "cc/output/overlay_candidate_validator.h" | 7 #include "cc/output/overlay_candidate_validator.h" |
| 8 #include "cc/quads/draw_quad.h" | 8 #include "cc/quads/draw_quad.h" |
| 9 #include "cc/quads/solid_color_draw_quad.h" | 9 #include "cc/quads/solid_color_draw_quad.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 OverlayStrategyUnderlay::OverlayStrategyUnderlay( | 13 OverlayStrategyUnderlay::OverlayStrategyUnderlay( |
| 14 OverlayCandidateValidator* capability_checker) | 14 OverlayCandidateValidator* capability_checker) |
| 15 : OverlayStrategyCommon(capability_checker) { | 15 : OverlayStrategyCommon(capability_checker) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 bool OverlayStrategyUnderlay::TryOverlay( | 18 bool OverlayStrategyUnderlay::TryOverlay( |
| 19 const OverlayProcessor::RendererState& renderer_state, |
| 19 OverlayCandidateValidator* capability_checker, | 20 OverlayCandidateValidator* capability_checker, |
| 20 | |
| 21 RenderPassList* render_passes_in_draw_order, | 21 RenderPassList* render_passes_in_draw_order, |
| 22 OverlayCandidateList* candidate_list, | 22 OverlayCandidateList* candidate_list, |
| 23 const OverlayCandidate& candidate, | 23 const OverlayCandidate& candidate, |
| 24 QuadList::Iterator candidate_iterator) { | 24 QuadList::Iterator candidate_iterator) { |
| 25 RenderPass* root_render_pass = render_passes_in_draw_order->back(); | 25 RenderPass* root_render_pass = render_passes_in_draw_order->back(); |
| 26 QuadList& quad_list = root_render_pass->quad_list; | 26 QuadList& quad_list = root_render_pass->quad_list; |
| 27 | 27 |
| 28 // Add our primary surface. | 28 // Add our primary surface. |
| 29 OverlayCandidateList candidates; | 29 OverlayCandidateList candidates; |
| 30 OverlayCandidate main_image; | 30 OverlayCandidate main_image; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 49 candidate_iterator); | 49 candidate_iterator); |
| 50 replacement->SetAll(shared_quad_state, rect, rect, rect, false, | 50 replacement->SetAll(shared_quad_state, rect, rect, rect, false, |
| 51 SK_ColorTRANSPARENT, true); | 51 SK_ColorTRANSPARENT, true); |
| 52 candidate_list->swap(candidates); | 52 candidate_list->swap(candidates); |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 return false; | 55 return false; |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace cc | 58 } // namespace cc |
| OLD | NEW |