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

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: change swapbuffers return Created 5 years, 7 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_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 18 matching lines...) Expand all
29 // A surface used to render to a view. 29 // A surface used to render to a view.
30 class NativeViewGLSurfaceWGL : public GLSurfaceWGL { 30 class NativeViewGLSurfaceWGL : public GLSurfaceWGL {
31 public: 31 public:
32 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window); 32 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window);
33 ~NativeViewGLSurfaceWGL() override; 33 ~NativeViewGLSurfaceWGL() override;
34 34
35 // Implement GLSurface. 35 // Implement GLSurface.
36 bool Initialize() override; 36 bool Initialize() override;
37 void Destroy() override; 37 void Destroy() override;
38 bool IsOffscreen() override; 38 bool IsOffscreen() override;
39 bool SwapBuffers() override; 39 gfx::SwapResult SwapBuffers() override;
40 gfx::Size GetSize() override; 40 gfx::Size GetSize() override;
41 void* GetHandle() override; 41 void* GetHandle() override;
42 42
43 private: 43 private:
44 gfx::AcceleratedWidget window_; 44 gfx::AcceleratedWidget window_;
45 gfx::AcceleratedWidget child_window_; 45 gfx::AcceleratedWidget child_window_;
46 HDC device_context_; 46 HDC device_context_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL); 48 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
49 }; 49 };
50 50
51 51
52 // A surface used to render to an offscreen pbuffer. 52 // A surface used to render to an offscreen pbuffer.
53 class PbufferGLSurfaceWGL : public GLSurfaceWGL { 53 class PbufferGLSurfaceWGL : public GLSurfaceWGL {
54 public: 54 public:
55 explicit PbufferGLSurfaceWGL(const gfx::Size& size); 55 explicit PbufferGLSurfaceWGL(const gfx::Size& size);
56 ~PbufferGLSurfaceWGL() override; 56 ~PbufferGLSurfaceWGL() override;
57 57
58 // Implement GLSurface. 58 // Implement GLSurface.
59 bool Initialize() override; 59 bool Initialize() override;
60 void Destroy() override; 60 void Destroy() override;
61 bool IsOffscreen() override; 61 bool IsOffscreen() override;
62 bool SwapBuffers() override; 62 gfx::SwapResult SwapBuffers() override;
63 gfx::Size GetSize() override; 63 gfx::Size GetSize() override;
64 void* GetHandle() override; 64 void* GetHandle() override;
65 65
66 private: 66 private:
67 gfx::Size size_; 67 gfx::Size size_;
68 HDC device_context_; 68 HDC device_context_;
69 void* pbuffer_; 69 void* pbuffer_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL); 71 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL);
72 }; 72 };
73 73
74 } // namespace gfx 74 } // namespace gfx
75 75
76 #endif // UI_GL_GL_SURFACE_WGL_H_ 76 #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') | ui/gl/gl_surface_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698