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 "content/browser/compositor/gpu_process_transport_factory.h" | 5 #include "content/browser/compositor/gpu_process_transport_factory.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 #if defined(USE_OZONE) | 161 #if defined(USE_OZONE) |
162 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates = | 162 std::unique_ptr<ui::OverlayCandidatesOzone> overlay_candidates = |
163 ui::OzonePlatform::GetInstance() | 163 ui::OzonePlatform::GetInstance() |
164 ->GetOverlayManager() | 164 ->GetOverlayManager() |
165 ->CreateOverlayCandidates(widget); | 165 ->CreateOverlayCandidates(widget); |
166 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 166 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
167 if (overlay_candidates && | 167 if (overlay_candidates && |
168 (command_line->HasSwitch(switches::kEnableHardwareOverlays) || | 168 (command_line->HasSwitch(switches::kEnableHardwareOverlays) || |
169 command_line->HasSwitch(switches::kOzoneTestSingleOverlaySupport))) { | 169 command_line->HasSwitch(switches::kOzoneTestSingleOverlaySupport))) { |
170 validator.reset(new BrowserCompositorOverlayCandidateValidatorOzone( | 170 validator.reset(new BrowserCompositorOverlayCandidateValidatorOzone( |
171 widget, std::move(overlay_candidates))); | 171 std::move(overlay_candidates))); |
172 } | 172 } |
173 #elif defined(OS_MACOSX) | 173 #elif defined(OS_MACOSX) |
174 // Overlays are only supported through the remote layer API. | 174 // Overlays are only supported through the remote layer API. |
175 if (ui::RemoteLayerAPISupported()) { | 175 if (ui::RemoteLayerAPISupported()) { |
176 validator.reset(new BrowserCompositorOverlayCandidateValidatorMac(widget)); | 176 validator.reset(new BrowserCompositorOverlayCandidateValidatorMac()); |
177 } | 177 } |
178 #elif defined(OS_ANDROID) | 178 #elif defined(OS_ANDROID) |
179 validator.reset(new BrowserCompositorOverlayCandidateValidatorAndroid()); | 179 validator.reset(new BrowserCompositorOverlayCandidateValidatorAndroid()); |
180 #endif | 180 #endif |
181 | 181 |
182 return validator; | 182 return validator; |
183 } | 183 } |
184 | 184 |
185 static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) { | 185 static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) { |
186 #if defined(MOJO_RUNNER_CLIENT) | 186 #if defined(MOJO_RUNNER_CLIENT) |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, | 675 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, |
676 observer_list_, | 676 observer_list_, |
677 OnLostResources()); | 677 OnLostResources()); |
678 | 678 |
679 // Kill things that use the shared context before killing the shared context. | 679 // Kill things that use the shared context before killing the shared context. |
680 lost_gl_helper.reset(); | 680 lost_gl_helper.reset(); |
681 lost_shared_main_thread_contexts = NULL; | 681 lost_shared_main_thread_contexts = NULL; |
682 } | 682 } |
683 | 683 |
684 } // namespace content | 684 } // namespace content |
OLD | NEW |