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

Unified Diff: ui/gl/gl_surface_egl.h

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 | « gpu/ipc/service/image_transport_surface_win.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.h
diff --git a/ui/gl/gl_surface_egl.h b/ui/gl/gl_surface_egl.h
index 3bb14e7a1eed4a0cb66d5c2933216281d2d836d4..474032a7fba37e4d099b89a1c845b6c9f837cb4f 100644
--- a/ui/gl/gl_surface_egl.h
+++ b/ui/gl/gl_surface_egl.h
@@ -24,6 +24,7 @@
#include "ui/gl/gl_export.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_surface_overlay.h"
+#include "ui/gl/sync_control_vsync_provider.h"
namespace gl {
@@ -45,6 +46,25 @@ GL_EXPORT void GetEGLInitDisplays(bool supports_angle_d3d,
const base::CommandLine* command_line,
std::vector<DisplayType>* init_displays);
+// VSync provider for EGL surface;
+class GL_EXPORT EGLSyncControlVSyncProvider : public SyncControlVSyncProvider {
+ public:
+ explicit EGLSyncControlVSyncProvider(EGLSurface surface);
+ ~EGLSyncControlVSyncProvider() override;
+
+ protected:
+ bool GetSyncValues(int64_t* system_time,
+ int64_t* media_stream_counter,
+ int64_t* swap_buffer_counter) override;
+
+ bool GetMscRate(int32_t* numerator, int32_t* denominator) override;
+
+ private:
+ EGLSurface surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(EGLSyncControlVSyncProvider);
+};
+
// Interface for EGL surface.
class GL_EXPORT GLSurfaceEGL : public GLSurface {
public:
« no previous file with comments | « gpu/ipc/service/image_transport_surface_win.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698