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

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

Issue 708483003: 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
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_H_ 5 #ifndef UI_GL_GL_SURFACE_H_
6 #define UI_GL_GL_SURFACE_H_ 6 #define UI_GL_GL_SURFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // Create a GL surface that renders directly to a view. 127 // Create a GL surface that renders directly to a view.
128 static scoped_refptr<GLSurface> CreateViewGLSurface( 128 static scoped_refptr<GLSurface> CreateViewGLSurface(
129 gfx::AcceleratedWidget window); 129 gfx::AcceleratedWidget window);
130 130
131 // Create a GL surface used for offscreen rendering. 131 // Create a GL surface used for offscreen rendering.
132 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( 132 static scoped_refptr<GLSurface> CreateOffscreenGLSurface(
133 const gfx::Size& size); 133 const gfx::Size& size);
134 134
135 static GLSurface* GetCurrent(); 135 static GLSurface* GetCurrent();
136 136
137 virtual void SetSwapInterval(int interval);
138
137 protected: 139 protected:
138 virtual ~GLSurface(); 140 virtual ~GLSurface();
139 static bool InitializeOneOffImplementation(GLImplementation impl, 141 static bool InitializeOneOffImplementation(GLImplementation impl,
140 bool fallback_to_osmesa, 142 bool fallback_to_osmesa,
141 bool gpu_service_logging, 143 bool gpu_service_logging,
142 bool disable_gl_drawing); 144 bool disable_gl_drawing);
143 static bool InitializeOneOffInternal(); 145 static bool InitializeOneOffInternal();
144 static void SetCurrent(GLSurface* surface); 146 static void SetCurrent(GLSurface* surface);
145 147
146 static bool ExtensionsContain(const char* extensions, const char* name); 148 static bool ExtensionsContain(const char* extensions, const char* name);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 194
193 private: 195 private:
194 scoped_refptr<GLSurface> surface_; 196 scoped_refptr<GLSurface> surface_;
195 197
196 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); 198 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
197 }; 199 };
198 200
199 } // namespace gfx 201 } // namespace gfx
200 202
201 #endif // UI_GL_GL_SURFACE_H_ 203 #endif // UI_GL_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/gl_surface.cc » ('j') | ui/gl/gl_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698