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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 2767293002: More reliable check for whether EGLSyncControlVSyncProvider should be instantiated. (Closed)
Patch Set: Created 3 years, 9 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/sync_control_vsync_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 9196ca0b094fb5621a4fc78e7efec853cd56b91f..3bdc7dc60e94e977289ba793c02745bc77c68275 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -146,6 +146,11 @@ class EGLSyncControlVSyncProvider : public SyncControlVSyncProvider {
~EGLSyncControlVSyncProvider() override {}
+ static bool IsSupported() {
+ return SyncControlVSyncProvider::IsSupported() &&
+ g_egl_sync_control_supported;
+ }
+
protected:
bool GetSyncValues(int64_t* system_time,
int64_t* media_stream_counter,
@@ -808,7 +813,7 @@ bool NativeViewGLSurfaceEGL::Initialize(
if (sync_provider)
vsync_provider_ = std::move(sync_provider);
- else if (g_egl_sync_control_supported)
+ else if (EGLSyncControlVSyncProvider::IsSupported())
vsync_provider_.reset(new EGLSyncControlVSyncProvider(surface_));
return true;
}
« no previous file with comments | « no previous file | ui/gl/sync_control_vsync_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698