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

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

Issue 2626413002: Route D3D VSync signal to Compositor (Closed)
Patch Set: Implement GPU VSync provider as gl::VSyncProvider Created 3 years, 11 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
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 62131284c7bd26c71fdbc3ac73be3ed2ee8edf7d..69e995dc2805fc35d1c4ca598a1307cc129befe8 100644
--- a/gpu/ipc/service/image_transport_surface_win.cc
+++ b/gpu/ipc/service/image_transport_surface_win.cc
@@ -8,12 +8,14 @@
#include "gpu/ipc/service/child_window_surface_win.h"
#include "gpu/ipc/service/direct_composition_surface_win.h"
+#include "gpu/ipc/service/gpu_vsync_provider_win.h"
#include "gpu/ipc/service/pass_through_image_transport_surface.h"
#include "gpu/ipc/service/switches.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_egl.h"
+#include "ui/gl/gl_switches.h"
#include "ui/gl/init/gl_factory.h"
#include "ui/gl/vsync_provider_win.h"
@@ -29,13 +31,13 @@ scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(
scoped_refptr<gl::GLSurface> surface;
if (gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2 &&
gl::GLSurfaceEGL::IsDirectCompositionSupported()) {
- // TODO(stanisc): http://crbug.com/659844:
- // Force DWM based gl::VSyncProviderWin provider to avoid video playback
- // smoothness issues. Once that issue is fixed, passing a nullptr
- // vsync_provider would result in assigning a default VSyncProvider inside
- // the Initialize call.
- std::unique_ptr<gfx::VSyncProvider> vsync_provider(
- new gl::VSyncProviderWin(surface_handle));
+ std::unique_ptr<gfx::VSyncProvider> vsync_provider;
+
+ if (base::FeatureList::IsEnabled(features::kD3DVsync))
+ vsync_provider.reset(new GpuVSyncProviderWin(delegate, surface_handle));
stanisc 2017/02/02 22:01:23 This doesn't work for CreateViewGLSurface case bel
+ else
+ vsync_provider.reset(new gl::VSyncProviderWin(surface_handle));
+
if (base::FeatureList::IsEnabled(switches::kDirectCompositionOverlays)) {
scoped_refptr<DirectCompositionSurfaceWin> egl_surface =
make_scoped_refptr(

Powered by Google App Engine
This is Rietveld 408576698