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

Unified Diff: gpu/ipc/service/image_transport_surface_win.cc

Issue 2411803003: Route DXGI Frame Statistics to VSyncProvider (Closed)
Patch Set: Build error fix Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/image_transport_surface_win.cc
diff --git a/gpu/ipc/service/image_transport_surface_win.cc b/gpu/ipc/service/image_transport_surface_win.cc
index 90fe567d7d66d576588ecebc2f064a8f05b40735..ce4db97d923633ce4e379aaa2554be21a0f2390e 100644
--- a/gpu/ipc/service/image_transport_surface_win.cc
+++ b/gpu/ipc/service/image_transport_surface_win.cc
@@ -32,9 +32,14 @@ scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(
new ChildWindowSurfaceWin(manager, surface_handle));
surface = egl_surface;
- // TODO(jbauman): Get frame statistics from DirectComposition
- std::unique_ptr<gfx::VSyncProvider> vsync_provider(
- new gl::VSyncProviderWin(surface_handle));
+ std::unique_ptr<gfx::VSyncProvider> vsync_provider;
+ // Use DWM based gl::VSyncProviderWin provider only if sync control
+ // extension isn't supported. Otherwise the Initialize call below should
+ // assign a default VSyncProvider.
+ if (!ChildWindowSurfaceWin::HasEGLExtension("EGL_CHROMIUM_sync_control")) {
+ vsync_provider.reset(new gl::VSyncProviderWin(surface_handle));
+ }
+
if (!egl_surface->Initialize(std::move(vsync_provider)))
return nullptr;
} else {
« no previous file with comments | « no previous file | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698