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

Unified Diff: content/common/gpu/image_transport_surface.cc

Issue 75723004: Disable Vsync when Aero Glass is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface.cc
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 4ce6f4020317ce81490964173d0b2e0fc8f348c2..7a2932385debd1d9a6a873355900a38db9b40122 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -19,6 +19,10 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_switches.h"
+#if defined(OS_WIN)
+#include "ui/base/win/shell.h"
+#endif
+
namespace content {
ImageTransportSurface::ImageTransportSurface() {}
@@ -164,6 +168,14 @@ bool ImageTransportHelper::MakeCurrent() {
}
void ImageTransportHelper::SetSwapInterval(gfx::GLContext* context) {
+#if defined(OS_WIN)
+ // If Aero Glass is enabled, then the renderer will handle ratelimiting and
+ // there's no tearing, so waiting for vsync is unnecessary.
+ if (ui::win::IsAeroGlassEnabled()) {
+ context->SetSwapInterval(0);
+ return;
+ }
+#endif
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync))
context->SetSwapInterval(0);
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698