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

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

Issue 2012803003: Fix --use-gl=desktop for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | 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 21 matching lines...) Expand all
32 }; 32 };
33 33
34 // A surface used to render to a view. 34 // A surface used to render to a view.
35 class NativeViewGLSurfaceWGL : public GLSurfaceWGL { 35 class NativeViewGLSurfaceWGL : public GLSurfaceWGL {
36 public: 36 public:
37 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window); 37 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window);
38 38
39 // Implement GLSurface. 39 // Implement GLSurface.
40 bool Initialize(GLSurface::Format format) override; 40 bool Initialize(GLSurface::Format format) override;
41 void Destroy() override; 41 void Destroy() override;
42 bool Resize(const gfx::Size& size,
43 float scale_factor,
44 bool has_alpha) override;
45 bool Recreate() override;
42 bool IsOffscreen() override; 46 bool IsOffscreen() override;
43 gfx::SwapResult SwapBuffers() override; 47 gfx::SwapResult SwapBuffers() override;
44 gfx::Size GetSize() override; 48 gfx::Size GetSize() override;
45 void* GetHandle() override; 49 void* GetHandle() override;
46 50
47 private: 51 private:
48 ~NativeViewGLSurfaceWGL() override; 52 ~NativeViewGLSurfaceWGL() override;
49 53
54 GLSurface::Format format_ = GLSurface::SURFACE_DEFAULT;
55
50 gfx::AcceleratedWidget window_; 56 gfx::AcceleratedWidget window_;
51 gfx::AcceleratedWidget child_window_; 57 gfx::AcceleratedWidget child_window_;
52 HDC device_context_; 58 HDC device_context_;
53 59
54 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL); 60 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
55 }; 61 };
56 62
57 63
58 // A surface used to render to an offscreen pbuffer. 64 // A surface used to render to an offscreen pbuffer.
59 class PbufferGLSurfaceWGL : public GLSurfaceWGL { 65 class PbufferGLSurfaceWGL : public GLSurfaceWGL {
(...skipping 14 matching lines...) Expand all
74 gfx::Size size_; 80 gfx::Size size_;
75 HDC device_context_; 81 HDC device_context_;
76 void* pbuffer_; 82 void* pbuffer_;
77 83
78 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL); 84 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL);
79 }; 85 };
80 86
81 } // namespace gfx 87 } // namespace gfx
82 88
83 #endif // UI_GL_GL_SURFACE_WGL_H_ 89 #endif // UI_GL_GL_SURFACE_WGL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gl/gl_surface_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698