OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_sandwich.h" | 5 #include "cc/output/overlay_strategy_sandwich.h" |
6 | 6 |
7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/output/overlay_candidate_validator.h" | 9 #include "cc/output/overlay_candidate_validator.h" |
10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 OverlayStrategySandwich::OverlayStrategySandwich( | 35 OverlayStrategySandwich::OverlayStrategySandwich( |
36 OverlayCandidateValidator* capability_checker) | 36 OverlayCandidateValidator* capability_checker) |
37 : capability_checker_(capability_checker) { | 37 : capability_checker_(capability_checker) { |
38 DCHECK(capability_checker); | 38 DCHECK(capability_checker); |
39 } | 39 } |
40 | 40 |
41 OverlayStrategySandwich::~OverlayStrategySandwich() {} | 41 OverlayStrategySandwich::~OverlayStrategySandwich() {} |
42 | 42 |
43 bool OverlayStrategySandwich::Attempt(ResourceProvider* resource_provider, | 43 bool OverlayStrategySandwich::Attempt(ResourceProvider* resource_provider, |
44 RenderPassList* render_passes, | 44 RenderPassList* render_passes, |
45 OverlayCandidateList* candidate_list, | 45 OverlayCandidateList* candidate_list) { |
46 gfx::Rect* damage_rect) { | |
47 QuadList& quad_list = render_passes->back()->quad_list; | 46 QuadList& quad_list = render_passes->back()->quad_list; |
48 for (auto it = quad_list.begin(); it != quad_list.end();) { | 47 for (auto it = quad_list.begin(); it != quad_list.end();) { |
49 OverlayCandidate candidate; | 48 OverlayCandidate candidate; |
50 if (OverlayCandidate::FromDrawQuad(resource_provider, *it, &candidate)) { | 49 if (OverlayCandidate::FromDrawQuad(resource_provider, *it, &candidate)) { |
51 it = TryOverlay(render_passes->back().get(), candidate_list, candidate, | 50 it = TryOverlay(render_passes->back().get(), candidate_list, candidate, |
52 it); | 51 it); |
53 } else { | 52 } else { |
54 ++it; | 53 ++it; |
55 } | 54 } |
56 } | 55 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 SK_ColorTRANSPARENT, true); | 174 SK_ColorTRANSPARENT, true); |
176 ++candidate_iter_in_quad_list; | 175 ++candidate_iter_in_quad_list; |
177 } | 176 } |
178 } | 177 } |
179 | 178 |
180 candidate_list->swap(new_candidate_list); | 179 candidate_list->swap(new_candidate_list); |
181 return candidate_iter_in_quad_list; | 180 return candidate_iter_in_quad_list; |
182 } | 181 } |
183 | 182 |
184 } // namespace cc | 183 } // namespace cc |
OLD | NEW |