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

Side by Side Diff: ui/gl/gl_surface_egl.h

Issue 710393003: Revert of Allow Windows to use system Vsync for a single window each swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GL_GL_SURFACE_EGL_H_ 5 #ifndef UI_GL_GL_SURFACE_EGL_H_
6 #define UI_GL_GL_SURFACE_EGL_H_ 6 #define UI_GL_GL_SURFACE_EGL_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. 76 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider.
77 // Takes ownership of the VSyncProvider. 77 // Takes ownership of the VSyncProvider.
78 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); 78 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider);
79 79
80 protected: 80 protected:
81 ~NativeViewGLSurfaceEGL() override; 81 ~NativeViewGLSurfaceEGL() override;
82 82
83 EGLNativeWindowType window_; 83 EGLNativeWindowType window_;
84 84
85 virtual void SetSwapInterval(int interval) override;
86
87 private: 85 private:
88 EGLSurface surface_; 86 EGLSurface surface_;
89 bool supports_post_sub_buffer_; 87 bool supports_post_sub_buffer_;
90 EGLConfig config_; 88 EGLConfig config_;
91 gfx::Size size_; 89 gfx::Size size_;
92 90
93 scoped_ptr<VSyncProvider> vsync_provider_; 91 scoped_ptr<VSyncProvider> vsync_provider_;
94 92
95 int swap_interval_;
96 unsigned int swap_generation_;
97 static unsigned int current_swap_generation_;
98
99 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); 93 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL);
100 }; 94 };
101 95
102 // Encapsulates a pbuffer EGL surface. 96 // Encapsulates a pbuffer EGL surface.
103 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { 97 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
104 public: 98 public:
105 explicit PbufferGLSurfaceEGL(const gfx::Size& size); 99 explicit PbufferGLSurfaceEGL(const gfx::Size& size);
106 100
107 // Implement GLSurface. 101 // Implement GLSurface.
108 EGLConfig GetConfig() override; 102 EGLConfig GetConfig() override;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 ~SurfacelessEGL() override; 142 ~SurfacelessEGL() override;
149 143
150 private: 144 private:
151 gfx::Size size_; 145 gfx::Size size_;
152 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); 146 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
153 }; 147 };
154 148
155 } // namespace gfx 149 } // namespace gfx
156 150
157 #endif // UI_GL_GL_SURFACE_EGL_H_ 151 #endif // UI_GL_GL_SURFACE_EGL_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698