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

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

Issue 49533003: Add support for Khr_surfaceless_context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fix: Use SurfacelessEGL only if requested size is 0,0. Created 7 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 | « no previous file | 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 protected: 104 protected:
105 virtual ~PbufferGLSurfaceEGL(); 105 virtual ~PbufferGLSurfaceEGL();
106 106
107 private: 107 private:
108 gfx::Size size_; 108 gfx::Size size_;
109 EGLSurface surface_; 109 EGLSurface surface_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); 111 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL);
112 }; 112 };
113 113
114 // SurfacelessEGL is used as Offscreen surface when platform supports
115 // KHR_surfaceless_context and GL_OES_surfaceless_context. This would avoid the
116 // need to create a dummy EGLsurface in case we render to client API targets.
117 class GL_EXPORT SurfacelessEGL : public GLSurfaceEGL {
118 public:
119 explicit SurfacelessEGL(const gfx::Size& size);
120
121 // Implement GLSurface.
122 virtual EGLConfig GetConfig() OVERRIDE;
123 virtual bool Initialize() OVERRIDE;
124 virtual void Destroy() OVERRIDE;
125 virtual bool IsOffscreen() OVERRIDE;
126 virtual bool SwapBuffers() OVERRIDE;
127 virtual gfx::Size GetSize() OVERRIDE;
128 virtual bool Resize(const gfx::Size& size) OVERRIDE;
129 virtual EGLSurface GetHandle() OVERRIDE;
130 virtual void* GetShareHandle() OVERRIDE;
131
132 protected:
133 virtual ~SurfacelessEGL();
134
135 private:
136 gfx::Size size_;
137 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
138 };
139
114 } // namespace gfx 140 } // namespace gfx
115 141
116 #endif // UI_GL_GL_SURFACE_EGL_H_ 142 #endif // UI_GL_GL_SURFACE_EGL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698