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

Unified Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2555173003: [Do not submit] D3DKMTWaitForVerticalBlankEvent VSync prototype (Closed)
Patch Set: Added command line switch and experiment support 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: content/browser/compositor/gpu_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
index 1d65415c2f4de51dc5aaa7dc9afce98a507f7568..aa20130465c48f3fa03ac5d8f4764585052fdd82 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -40,6 +40,22 @@ GpuBrowserCompositorOutputSurface::~GpuBrowserCompositorOutputSurface() {
UpdateVSyncParametersCallback());
}
+GpuVSyncControl* GpuBrowserCompositorOutputSurface::GetVSyncControl() {
+#if defined(OS_WIN)
+ return this;
+#else
+ return nullptr;
+#endif // defined(OS_WIN)
+}
+
+void GpuBrowserCompositorOutputSurface::EnableVSync(bool enabled) {
+#if defined(OS_WIN)
+ GetCommandBufferProxy()->EnableVSync(enabled);
+#else
+ NOTREACHED();
+#endif // defined(OS_WIN)
+}
+
void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
const std::vector<ui::LatencyInfo>& latency_info,
gfx::SwapResult result,

Powered by Google App Engine
This is Rietveld 408576698