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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 GetDisplay(), EGL_D3D_TEXTURE_ANGLE, buffer, GetConfig(), | 1269 GetDisplay(), EGL_D3D_TEXTURE_ANGLE, buffer, GetConfig(), |
1270 &pbuffer_attribs[0]); | 1270 &pbuffer_attribs[0]); |
1271 | 1271 |
1272 return true; | 1272 return true; |
1273 } | 1273 } |
1274 | 1274 |
1275 gfx::Vector2d DirectCompositionSurfaceWin::GetDrawOffset() const { | 1275 gfx::Vector2d DirectCompositionSurfaceWin::GetDrawOffset() const { |
1276 return draw_offset_; | 1276 return draw_offset_; |
1277 } | 1277 } |
1278 | 1278 |
| 1279 void DirectCompositionSurfaceWin::WaitForSnapshotRendering() { |
| 1280 DCHECK(gl::GLContext::GetCurrent()->IsCurrent(this)); |
| 1281 glFinish(); |
| 1282 } |
| 1283 |
1279 scoped_refptr<base::TaskRunner> | 1284 scoped_refptr<base::TaskRunner> |
1280 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { | 1285 DirectCompositionSurfaceWin::GetWindowTaskRunnerForTesting() { |
1281 return child_window_.GetTaskRunnerForTesting(); | 1286 return child_window_.GetTaskRunnerForTesting(); |
1282 } | 1287 } |
1283 | 1288 |
1284 base::win::ScopedComPtr<IDXGISwapChain1> | 1289 base::win::ScopedComPtr<IDXGISwapChain1> |
1285 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { | 1290 DirectCompositionSurfaceWin::GetLayerSwapChainForTesting(size_t index) const { |
1286 return layer_tree_->GetLayerSwapChainForTesting(index); | 1291 return layer_tree_->GetLayerSwapChainForTesting(index); |
1287 } | 1292 } |
1288 | 1293 |
1289 } // namespace gpu | 1294 } // namespace gpu |
OLD | NEW |