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/quads/draw_quad.h" | 7 #include "cc/quads/draw_quad.h" |
8 #include "cc/quads/solid_color_draw_quad.h" | 8 #include "cc/quads/solid_color_draw_quad.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 | 11 |
12 OverlayStrategyUnderlay::OverlayStrategyUnderlay( | 12 OverlayStrategyUnderlay::OverlayStrategyUnderlay( |
13 OverlayCandidateValidator* capability_checker, | 13 OverlayCandidateValidator* capability_checker) |
14 ResourceProvider* resource_provider) | 14 : capability_checker_(capability_checker) { |
15 : OverlayStrategyCommon(capability_checker, resource_provider) { | |
16 } | 15 } |
17 | 16 |
18 bool OverlayStrategyUnderlay::Attempt( | 17 bool OverlayStrategyUnderlay::Attempt( |
19 RenderPassList* render_passes_in_draw_order, | 18 RenderPassList* render_passes_in_draw_order, |
20 OverlayCandidateList* candidate_list) { | 19 OverlayCandidateList* candidate_list) { |
21 if (!capability_checker_) | 20 if (!capability_checker_) |
22 return false; | 21 return false; |
23 | 22 |
24 RenderPass* root_render_pass = render_passes_in_draw_order->back(); | 23 RenderPass* root_render_pass = render_passes_in_draw_order->back(); |
25 DCHECK(root_render_pass); | 24 DCHECK(root_render_pass); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 candidate_iterator); | 59 candidate_iterator); |
61 replacement->SetAll(shared_quad_state, rect, rect, rect, false, | 60 replacement->SetAll(shared_quad_state, rect, rect, rect, false, |
62 SK_ColorTRANSPARENT, true); | 61 SK_ColorTRANSPARENT, true); |
63 candidate_list->swap(candidates); | 62 candidate_list->swap(candidates); |
64 return true; | 63 return true; |
65 } | 64 } |
66 return false; | 65 return false; |
67 } | 66 } |
68 | 67 |
69 } // namespace cc | 68 } // namespace cc |
OLD | NEW |