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