Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: gpu/ipc/service/direct_composition_surface_win.cc

Issue 2888993002: Do glFinish before sending snapshot latency info to browser (Closed)
Patch Set: add current tests Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/ipc/service/direct_composition_surface_win.h ('k') | gpu/ipc/service/pass_through_image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698