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

Side by Side Diff: ui/gl/gl_surface_glx.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_egl.cc ('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 <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX, 54 class GL_EXPORT NativeViewGLSurfaceGLX : public GLSurfaceGLX,
55 public ui::PlatformEventDispatcher { 55 public ui::PlatformEventDispatcher {
56 public: 56 public:
57 explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window); 57 explicit NativeViewGLSurfaceGLX(gfx::AcceleratedWidget window);
58 58
59 // Implement GLSurfaceGLX. 59 // Implement GLSurfaceGLX.
60 bool Initialize() override; 60 bool Initialize() override;
61 void Destroy() override; 61 void Destroy() override;
62 bool Resize(const gfx::Size& size) override; 62 bool Resize(const gfx::Size& size) 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 bool SupportsPostSubBuffer() override; 67 bool SupportsPostSubBuffer() override;
68 void* GetConfig() override; 68 void* GetConfig() override;
69 bool PostSubBuffer(int x, int y, int width, int height) override; 69 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override;
70 VSyncProvider* GetVSyncProvider() override; 70 VSyncProvider* GetVSyncProvider() override;
71 71
72 protected: 72 protected:
73 ~NativeViewGLSurfaceGLX() override; 73 ~NativeViewGLSurfaceGLX() override;
74 74
75 private: 75 private:
76 // The handle for the drawable to make current or swap. 76 // The handle for the drawable to make current or swap.
77 gfx::AcceleratedWidget GetDrawableHandle() const; 77 gfx::AcceleratedWidget GetDrawableHandle() const;
78 78
79 // PlatformEventDispatcher implementation 79 // PlatformEventDispatcher implementation
(...skipping 16 matching lines...) Expand all
96 96
97 // A surface used to render to an offscreen pbuffer. 97 // A surface used to render to an offscreen pbuffer.
98 class GL_EXPORT UnmappedNativeViewGLSurfaceGLX : public GLSurfaceGLX { 98 class GL_EXPORT UnmappedNativeViewGLSurfaceGLX : public GLSurfaceGLX {
99 public: 99 public:
100 explicit UnmappedNativeViewGLSurfaceGLX(const gfx::Size& size); 100 explicit UnmappedNativeViewGLSurfaceGLX(const gfx::Size& size);
101 101
102 // Implement GLSurfaceGLX. 102 // Implement GLSurfaceGLX.
103 bool Initialize() override; 103 bool Initialize() override;
104 void Destroy() override; 104 void Destroy() override;
105 bool IsOffscreen() override; 105 bool IsOffscreen() override;
106 bool SwapBuffers() override; 106 gfx::SwapResult SwapBuffers() override;
107 gfx::Size GetSize() override; 107 gfx::Size GetSize() override;
108 void* GetHandle() override; 108 void* GetHandle() override;
109 void* GetConfig() override; 109 void* GetConfig() override;
110 110
111 protected: 111 protected:
112 ~UnmappedNativeViewGLSurfaceGLX() override; 112 ~UnmappedNativeViewGLSurfaceGLX() override;
113 113
114 private: 114 private:
115 gfx::Size size_; 115 gfx::Size size_;
116 void* config_; 116 void* config_;
117 // Unmapped dummy window, used to provide a compatible surface. 117 // Unmapped dummy window, used to provide a compatible surface.
118 gfx::AcceleratedWidget window_; 118 gfx::AcceleratedWidget window_;
119 119
120 DISALLOW_COPY_AND_ASSIGN(UnmappedNativeViewGLSurfaceGLX); 120 DISALLOW_COPY_AND_ASSIGN(UnmappedNativeViewGLSurfaceGLX);
121 }; 121 };
122 122
123 } // namespace gfx 123 } // namespace gfx
124 124
125 #endif // UI_GL_GL_SURFACE_GLX_H_ 125 #endif // UI_GL_GL_SURFACE_GLX_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698