| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "gpu/ipc/service/direct_composition_surface_win.h" | 5 #include "gpu/ipc/service/direct_composition_surface_win.h" |
| 6 | 6 |
| 7 #include <d3d11_1.h> | 7 #include <d3d11_1.h> |
| 8 #include <dcomptypes.h> | 8 #include <dcomptypes.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return false; | 111 return false; |
| 112 | 112 |
| 113 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 113 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 114 if (command_line->HasSwitch(switches::kEnableDirectCompositionLayers)) | 114 if (command_line->HasSwitch(switches::kEnableDirectCompositionLayers)) |
| 115 return true; | 115 return true; |
| 116 if (command_line->HasSwitch(switches::kDisableDirectCompositionLayers)) | 116 if (command_line->HasSwitch(switches::kDisableDirectCompositionLayers)) |
| 117 return false; | 117 return false; |
| 118 | 118 |
| 119 // Before Windows 10 Anniversary Update (Redstone 1), overlay planes | 119 // Before Windows 10 Anniversary Update (Redstone 1), overlay planes |
| 120 // wouldn't be assigned to non-UWP apps. | 120 // wouldn't be assigned to non-UWP apps. |
| 121 if (base::win::GetVersion() < base::win::VERSION_WIN10_R1) | 121 if (base::win::GetVersion() < base::win::VERSION_WIN10_RS1) |
| 122 return false; | 122 return false; |
| 123 | 123 |
| 124 base::win::ScopedComPtr<ID3D11Device> d3d11_device = | 124 base::win::ScopedComPtr<ID3D11Device> d3d11_device = |
| 125 gl::QueryD3D11DeviceObjectFromANGLE(); | 125 gl::QueryD3D11DeviceObjectFromANGLE(); |
| 126 if (!d3d11_device) { | 126 if (!d3d11_device) { |
| 127 DLOG(ERROR) << "Failing to create overlay swapchain because couldn't " | 127 DLOG(ERROR) << "Failing to create overlay swapchain because couldn't " |
| 128 "retrieve D3D11 device from ANGLE."; | 128 "retrieve D3D11 device from ANGLE."; |
| 129 return false; | 129 return false; |
| 130 } | 130 } |
| 131 | 131 |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { | 1280 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { |
| 1281 return child_window_.GetTaskRunnerForTesting(); | 1281 return child_window_.GetTaskRunnerForTesting(); |
| 1282 } | 1282 } |
| 1283 | 1283 |
| 1284 base::win::ScopedComPtr<IDXGISwapChain1> | 1284 base::win::ScopedComPtr<IDXGISwapChain1> |
| 1285 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { | 1285 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { |
| 1286 return layer_tree_->GetLayerSwapChainForTesting(index); | 1286 return layer_tree_->GetLayerSwapChainForTesting(index); |
| 1287 } | 1287 } |
| 1288 | 1288 |
| 1289 } // namespace gpu | 1289 } // namespace gpu |
| OLD | NEW |