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

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

Issue 2702403009: Make surface GetFormat pure virtual, add missing overrides. (Closed)
Patch Set: Fix class name for Windows Created 3 years, 10 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_stub.cc ('k') | ui/gl/gl_surface_wgl.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_WGL_H_ 5 #ifndef UI_GL_GL_SURFACE_WGL_H_
6 #define UI_GL_GL_SURFACE_WGL_H_ 6 #define UI_GL_GL_SURFACE_WGL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gl/gl_export.h" 10 #include "ui/gl/gl_export.h"
(...skipping 29 matching lines...) Expand all
40 bool Initialize(GLSurfaceFormat format) override; 40 bool Initialize(GLSurfaceFormat format) override;
41 void Destroy() override; 41 void Destroy() override;
42 bool Resize(const gfx::Size& size, 42 bool Resize(const gfx::Size& size,
43 float scale_factor, 43 float scale_factor,
44 bool has_alpha) override; 44 bool has_alpha) override;
45 bool Recreate() override; 45 bool Recreate() override;
46 bool IsOffscreen() override; 46 bool IsOffscreen() override;
47 gfx::SwapResult SwapBuffers() override; 47 gfx::SwapResult SwapBuffers() override;
48 gfx::Size GetSize() override; 48 gfx::Size GetSize() override;
49 void* GetHandle() override; 49 void* GetHandle() override;
50 GLSurfaceFormat GetFormat() override;
50 51
51 private: 52 private:
52 ~NativeViewGLSurfaceWGL() override; 53 ~NativeViewGLSurfaceWGL() override;
53 54
54 GLSurfaceFormat format_; 55 GLSurfaceFormat format_;
55 56
56 gfx::AcceleratedWidget window_; 57 gfx::AcceleratedWidget window_;
57 gfx::AcceleratedWidget child_window_; 58 gfx::AcceleratedWidget child_window_;
58 HDC device_context_; 59 HDC device_context_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL); 61 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
61 }; 62 };
62 63
63 64
64 // A surface used to render to an offscreen pbuffer. 65 // A surface used to render to an offscreen pbuffer.
65 class GL_EXPORT PbufferGLSurfaceWGL : public GLSurfaceWGL { 66 class GL_EXPORT PbufferGLSurfaceWGL : public GLSurfaceWGL {
66 public: 67 public:
67 explicit PbufferGLSurfaceWGL(const gfx::Size& size); 68 explicit PbufferGLSurfaceWGL(const gfx::Size& size);
68 69
69 // Implement GLSurface. 70 // Implement GLSurface.
70 bool Initialize(GLSurfaceFormat format) override; 71 bool Initialize(GLSurfaceFormat format) override;
71 void Destroy() override; 72 void Destroy() override;
72 bool IsOffscreen() override; 73 bool IsOffscreen() override;
73 gfx::SwapResult SwapBuffers() override; 74 gfx::SwapResult SwapBuffers() override;
74 gfx::Size GetSize() override; 75 gfx::Size GetSize() override;
75 void* GetHandle() override; 76 void* GetHandle() override;
77 GLSurfaceFormat GetFormat() override;
76 78
77 private: 79 private:
78 ~PbufferGLSurfaceWGL() override; 80 ~PbufferGLSurfaceWGL() override;
79 81
80 gfx::Size size_; 82 gfx::Size size_;
81 HDC device_context_; 83 HDC device_context_;
82 void* pbuffer_; 84 void* pbuffer_;
83 85
84 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL); 86 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL);
85 }; 87 };
86 88
87 } // namespace gl 89 } // namespace gl
88 90
89 #endif // UI_GL_GL_SURFACE_WGL_H_ 91 #endif // UI_GL_GL_SURFACE_WGL_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_stub.cc ('k') | ui/gl/gl_surface_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698