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

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

Issue 1084173004: Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ozone demo Created 5 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 | « 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 "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/gl/gl_surface.h" 9 #include "ui/gl/gl_surface.h"
10 10
(...skipping 19 matching lines...) Expand all
30 30
31 // A surface used to render to a view. 31 // A surface used to render to a view.
32 class NativeViewGLSurfaceWGL : public GLSurfaceWGL { 32 class NativeViewGLSurfaceWGL : public GLSurfaceWGL {
33 public: 33 public:
34 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window); 34 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window);
35 35
36 // Implement GLSurface. 36 // Implement GLSurface.
37 bool Initialize() override; 37 bool Initialize() override;
38 void Destroy() override; 38 void Destroy() override;
39 bool IsOffscreen() override; 39 bool IsOffscreen() override;
40 bool SwapBuffers() override; 40 gfx::SwapResult SwapBuffers() override;
41 gfx::Size GetSize() override; 41 gfx::Size GetSize() override;
42 void* GetHandle() override; 42 void* GetHandle() override;
43 43
44 private: 44 private:
45 ~NativeViewGLSurfaceWGL() override; 45 ~NativeViewGLSurfaceWGL() override;
46 46
47 gfx::AcceleratedWidget window_; 47 gfx::AcceleratedWidget window_;
48 gfx::AcceleratedWidget child_window_; 48 gfx::AcceleratedWidget child_window_;
49 HDC device_context_; 49 HDC device_context_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL); 51 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
52 }; 52 };
53 53
54 54
55 // A surface used to render to an offscreen pbuffer. 55 // A surface used to render to an offscreen pbuffer.
56 class PbufferGLSurfaceWGL : public GLSurfaceWGL { 56 class PbufferGLSurfaceWGL : public GLSurfaceWGL {
57 public: 57 public:
58 explicit PbufferGLSurfaceWGL(const gfx::Size& size); 58 explicit PbufferGLSurfaceWGL(const gfx::Size& size);
59 59
60 // Implement GLSurface. 60 // Implement GLSurface.
61 bool Initialize() override; 61 bool Initialize() override;
62 void Destroy() override; 62 void Destroy() override;
63 bool IsOffscreen() override; 63 bool IsOffscreen() override;
64 bool SwapBuffers() override; 64 gfx::SwapResult SwapBuffers() override;
65 gfx::Size GetSize() override; 65 gfx::Size GetSize() override;
66 void* GetHandle() override; 66 void* GetHandle() override;
67 67
68 private: 68 private:
69 ~PbufferGLSurfaceWGL() override; 69 ~PbufferGLSurfaceWGL() override;
70 70
71 gfx::Size size_; 71 gfx::Size size_;
72 HDC device_context_; 72 HDC device_context_;
73 void* pbuffer_; 73 void* pbuffer_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL); 75 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL);
76 }; 76 };
77 77
78 } // namespace gfx 78 } // namespace gfx
79 79
80 #endif // UI_GL_GL_SURFACE_WGL_H_ 80 #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