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

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

Issue 938873002: Add a new API to create a surfaceless GLSurface for Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont need to modify vsync update path with synchronous swapbuffers now Created 5 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 unified diff | Download patch
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | ui/gl/gl_surface_ozone.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_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/callback.h" 10 #include "base/callback.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 GLImage* image, 149 GLImage* image,
150 const Rect& bounds_rect, 150 const Rect& bounds_rect,
151 const RectF& crop_rect); 151 const RectF& crop_rect);
152 152
153 virtual bool IsSurfaceless() const; 153 virtual bool IsSurfaceless() const;
154 154
155 // Create a GL surface that renders directly to a view. 155 // Create a GL surface that renders directly to a view.
156 static scoped_refptr<GLSurface> CreateViewGLSurface( 156 static scoped_refptr<GLSurface> CreateViewGLSurface(
157 gfx::AcceleratedWidget window); 157 gfx::AcceleratedWidget window);
158 158
159 #if defined(USE_OZONE)
160 // Create a GL surface that renders directly into a window with surfaceless
161 // semantics - there is no default framebuffer and the primary surface must
162 // be presented as an overlay. If surfaceless mode is not supported or
163 // enabled it will return a null pointer.
164 static scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface(
165 gfx::AcceleratedWidget window);
166 #endif // defined(USE_OZONE)
167
159 // Create a GL surface used for offscreen rendering. 168 // Create a GL surface used for offscreen rendering.
160 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( 169 static scoped_refptr<GLSurface> CreateOffscreenGLSurface(
161 const gfx::Size& size); 170 const gfx::Size& size);
162 171
163 static GLSurface* GetCurrent(); 172 static GLSurface* GetCurrent();
164 173
165 // Called when the swap interval for the associated context changes. 174 // Called when the swap interval for the associated context changes.
166 virtual void OnSetSwapInterval(int interval); 175 virtual void OnSetSwapInterval(int interval);
167 176
168 protected: 177 protected:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 238
230 private: 239 private:
231 scoped_refptr<GLSurface> surface_; 240 scoped_refptr<GLSurface> surface_;
232 241
233 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); 242 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter);
234 }; 243 };
235 244
236 } // namespace gfx 245 } // namespace gfx
237 246
238 #endif // UI_GL_GL_SURFACE_H_ 247 #endif // UI_GL_GL_SURFACE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/rendering_helper.cc ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698