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 "components/display_compositor/compositor_overlay_candidate_validator_o
zone.h" | 5 #include "components/display_compositor/compositor_overlay_candidate_validator_o
zone.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 : overlay_candidates_(std::move(overlay_candidates)), | 35 : overlay_candidates_(std::move(overlay_candidates)), |
36 single_fullscreen_(single_fullscreen), | 36 single_fullscreen_(single_fullscreen), |
37 software_mirror_active_(false) {} | 37 software_mirror_active_(false) {} |
38 | 38 |
39 CompositorOverlayCandidateValidatorOzone:: | 39 CompositorOverlayCandidateValidatorOzone:: |
40 ~CompositorOverlayCandidateValidatorOzone() {} | 40 ~CompositorOverlayCandidateValidatorOzone() {} |
41 | 41 |
42 void CompositorOverlayCandidateValidatorOzone::GetStrategies( | 42 void CompositorOverlayCandidateValidatorOzone::GetStrategies( |
43 cc::OverlayProcessor::StrategyList* strategies) { | 43 cc::OverlayProcessor::StrategyList* strategies) { |
44 if (single_fullscreen_) { | 44 if (single_fullscreen_) { |
45 strategies->push_back( | 45 strategies->push_back(base::MakeUnique<cc::OverlayStrategyFullscreen>()); |
46 base::WrapUnique(new cc::OverlayStrategyFullscreen())); | |
47 } else { | 46 } else { |
48 strategies->push_back( | 47 strategies->push_back( |
49 base::WrapUnique(new cc::OverlayStrategySingleOnTop(this))); | 48 base::MakeUnique<cc::OverlayStrategySingleOnTop>(this)); |
50 strategies->push_back( | 49 strategies->push_back(base::MakeUnique<cc::OverlayStrategyUnderlay>(this)); |
51 base::WrapUnique(new cc::OverlayStrategyUnderlay(this))); | |
52 } | 50 } |
53 } | 51 } |
54 | 52 |
55 bool CompositorOverlayCandidateValidatorOzone::AllowCALayerOverlays() { | 53 bool CompositorOverlayCandidateValidatorOzone::AllowCALayerOverlays() { |
56 return false; | 54 return false; |
57 } | 55 } |
58 | 56 |
59 void CompositorOverlayCandidateValidatorOzone::CheckOverlaySupport( | 57 void CompositorOverlayCandidateValidatorOzone::CheckOverlaySupport( |
60 cc::OverlayCandidateList* surfaces) { | 58 cc::OverlayCandidateList* surfaces) { |
61 // SW mirroring copies out of the framebuffer, so we can't remove any | 59 // SW mirroring copies out of the framebuffer, so we can't remove any |
(...skipping 27 matching lines...) Expand all Loading... |
89 surfaces->at(i).display_rect = ozone_surface_list.at(i).display_rect; | 87 surfaces->at(i).display_rect = ozone_surface_list.at(i).display_rect; |
90 } | 88 } |
91 } | 89 } |
92 | 90 |
93 void CompositorOverlayCandidateValidatorOzone::SetSoftwareMirrorMode( | 91 void CompositorOverlayCandidateValidatorOzone::SetSoftwareMirrorMode( |
94 bool enabled) { | 92 bool enabled) { |
95 software_mirror_active_ = enabled; | 93 software_mirror_active_ = enabled; |
96 } | 94 } |
97 | 95 |
98 } // namespace display_compositor | 96 } // namespace display_compositor |
OLD | NEW |