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

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

Issue 14358014: gpu: Add EGL fence support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual bool Initialize() OVERRIDE; 60 virtual bool Initialize() OVERRIDE;
61 virtual void Destroy() OVERRIDE; 61 virtual void Destroy() OVERRIDE;
62 virtual bool Resize(const gfx::Size& size) OVERRIDE; 62 virtual bool Resize(const gfx::Size& size) OVERRIDE;
63 virtual bool IsOffscreen() OVERRIDE; 63 virtual bool IsOffscreen() OVERRIDE;
64 virtual bool SwapBuffers() OVERRIDE; 64 virtual bool SwapBuffers() OVERRIDE;
65 virtual gfx::Size GetSize() OVERRIDE; 65 virtual gfx::Size GetSize() OVERRIDE;
66 virtual EGLSurface GetHandle() OVERRIDE; 66 virtual EGLSurface GetHandle() OVERRIDE;
67 virtual std::string GetExtensions() OVERRIDE; 67 virtual std::string GetExtensions() OVERRIDE;
68 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; 68 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
69 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; 69 virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
70 virtual void SetMaximumFrameLatency(unsigned int frames) OVERRIDE;
Sami 2013/04/24 10:44:18 We spoke with Daniel that maybe something like Set
no sievers 2013/04/24 12:23:53 In gles2_implementation.cc we call it 'MaxSwapBuff
epennerAtGoogle 2013/04/24 19:33:38 Okay. I stole this name from D3D :P I'll rename.
70 71
71 protected: 72 protected:
72 virtual ~NativeViewGLSurfaceEGL(); 73 virtual ~NativeViewGLSurfaceEGL();
73 void SetHandle(EGLSurface surface); 74 void SetHandle(EGLSurface surface);
74 75
75 private: 76 private:
76 gfx::AcceleratedWidget window_; 77 gfx::AcceleratedWidget window_;
77 EGLSurface surface_; 78 EGLSurface surface_;
78 bool supports_post_sub_buffer_; 79 bool supports_post_sub_buffer_;
79 EGLConfig config_; 80 EGLConfig config_;
80 81
82 std::deque<EGLSyncKHR> frame_fences_;
83 unsigned int max_frame_latency_;
84
81 scoped_ptr<VSyncProvider> vsync_provider_; 85 scoped_ptr<VSyncProvider> vsync_provider_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); 87 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL);
84 }; 88 };
85 89
86 // Encapsulates a pbuffer EGL surface. 90 // Encapsulates a pbuffer EGL surface.
87 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { 91 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL {
88 public: 92 public:
89 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); 93 PbufferGLSurfaceEGL(bool software, const gfx::Size& size);
90 94
(...skipping 14 matching lines...) Expand all
105 private: 109 private:
106 gfx::Size size_; 110 gfx::Size size_;
107 EGLSurface surface_; 111 EGLSurface surface_;
108 112
109 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); 113 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL);
110 }; 114 };
111 115
112 } // namespace gfx 116 } // namespace gfx
113 117
114 #endif // UI_GL_GL_SURFACE_EGL_H_ 118 #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') | ui/gl/gl_surface_egl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698