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

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

Issue 2702403009: Make surface GetFormat pure virtual, add missing overrides. (Closed)
Patch Set: Fix class name for Windows Created 3 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 | « ui/gl/gl_surface_format.h ('k') | ui/gl/gl_surface_glx.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_GLX_H_ 5 #ifndef UI_GL_GL_SURFACE_GLX_H_
6 #define UI_GL_GL_SURFACE_GLX_H_ 6 #define UI_GL_GL_SURFACE_GLX_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void Destroy() override; 65 void Destroy() override;
66 bool Resize(const gfx::Size& size, 66 bool Resize(const gfx::Size& size,
67 float scale_factor, 67 float scale_factor,
68 bool has_alpha) override; 68 bool has_alpha) override;
69 bool IsOffscreen() override; 69 bool IsOffscreen() override;
70 gfx::SwapResult SwapBuffers() override; 70 gfx::SwapResult SwapBuffers() override;
71 gfx::Size GetSize() override; 71 gfx::Size GetSize() override;
72 void* GetHandle() override; 72 void* GetHandle() override;
73 bool SupportsPostSubBuffer() override; 73 bool SupportsPostSubBuffer() override;
74 void* GetConfig() override; 74 void* GetConfig() override;
75 GLSurfaceFormat GetFormat() override;
75 unsigned long GetCompatibilityKey() override; 76 unsigned long GetCompatibilityKey() override;
76 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; 77 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
77 gfx::VSyncProvider* GetVSyncProvider() override; 78 gfx::VSyncProvider* GetVSyncProvider() override;
78 VisualID GetVisualID() const { return visual_id_; } 79 VisualID GetVisualID() const { return visual_id_; }
79 80
80 protected: 81 protected:
81 ~NativeViewGLSurfaceGLX() override; 82 ~NativeViewGLSurfaceGLX() override;
82 83
83 // Handle registering and unregistering for Expose events. 84 // Handle registering and unregistering for Expose events.
84 virtual void RegisterEvents() = 0; 85 virtual void RegisterEvents() = 0;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 explicit UnmappedNativeViewGLSurfaceGLX(const gfx::Size& size); 121 explicit UnmappedNativeViewGLSurfaceGLX(const gfx::Size& size);
121 122
122 // Implement GLSurfaceGLX. 123 // Implement GLSurfaceGLX.
123 bool Initialize(GLSurfaceFormat format) override; 124 bool Initialize(GLSurfaceFormat format) override;
124 void Destroy() override; 125 void Destroy() override;
125 bool IsOffscreen() override; 126 bool IsOffscreen() override;
126 gfx::SwapResult SwapBuffers() override; 127 gfx::SwapResult SwapBuffers() override;
127 gfx::Size GetSize() override; 128 gfx::Size GetSize() override;
128 void* GetHandle() override; 129 void* GetHandle() override;
129 void* GetConfig() override; 130 void* GetConfig() override;
131 GLSurfaceFormat GetFormat() override;
130 unsigned long GetCompatibilityKey() override; 132 unsigned long GetCompatibilityKey() override;
131 133
132 protected: 134 protected:
133 ~UnmappedNativeViewGLSurfaceGLX() override; 135 ~UnmappedNativeViewGLSurfaceGLX() override;
134 136
135 private: 137 private:
136 gfx::Size size_; 138 gfx::Size size_;
137 GLXFBConfig config_; 139 GLXFBConfig config_;
138 // Unmapped dummy window, used to provide a compatible surface. 140 // Unmapped dummy window, used to provide a compatible surface.
139 gfx::AcceleratedWidget window_; 141 gfx::AcceleratedWidget window_;
140 142
141 // GLXDrawable for the window. 143 // GLXDrawable for the window.
142 GLXWindow glx_window_; 144 GLXWindow glx_window_;
143 145
144 DISALLOW_COPY_AND_ASSIGN(UnmappedNativeViewGLSurfaceGLX); 146 DISALLOW_COPY_AND_ASSIGN(UnmappedNativeViewGLSurfaceGLX);
145 }; 147 };
146 148
147 } // namespace gl 149 } // namespace gl
148 150
149 #endif // UI_GL_GL_SURFACE_GLX_H_ 151 #endif // UI_GL_GL_SURFACE_GLX_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_format.h ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698