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

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

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the existing output surface mechanism to feed vsync info into the compositor Created 8 years, 1 month 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 | Annotate | Revision Log
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 "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 10 matching lines...) Expand all
21 21
22 static bool InitializeOneOff(); 22 static bool InitializeOneOff();
23 23
24 // These aren't particularly tied to surfaces, but since we already 24 // These aren't particularly tied to surfaces, but since we already
25 // have the static InitializeOneOff here, it's easiest to reuse its 25 // have the static InitializeOneOff here, it's easiest to reuse its
26 // initialization guards. 26 // initialization guards.
27 static const char* GetGLXExtensions(); 27 static const char* GetGLXExtensions();
28 static bool HasGLXExtension(const char* name); 28 static bool HasGLXExtension(const char* name);
29 static bool IsCreateContextRobustnessSupported(); 29 static bool IsCreateContextRobustnessSupported();
30 static bool IsTextureFromPixmapSupported(); 30 static bool IsTextureFromPixmapSupported();
31 static bool IsOMLSyncControlSupported();
31 32
32 virtual void* GetDisplay() OVERRIDE; 33 virtual void* GetDisplay() OVERRIDE;
33 34
34 // Get the FB config that the surface was created with or NULL if it is not 35 // Get the FB config that the surface was created with or NULL if it is not
35 // a GLX drawable. 36 // a GLX drawable.
36 virtual void* GetConfig() = 0; 37 virtual void* GetConfig() = 0;
37 38
38 protected: 39 protected:
39 virtual ~GLSurfaceGLX(); 40 virtual ~GLSurfaceGLX();
40 41
(...skipping 10 matching lines...) Expand all
51 virtual bool Initialize() OVERRIDE; 52 virtual bool Initialize() OVERRIDE;
52 virtual void Destroy() OVERRIDE; 53 virtual void Destroy() OVERRIDE;
53 virtual bool Resize(const gfx::Size& size) OVERRIDE; 54 virtual bool Resize(const gfx::Size& size) OVERRIDE;
54 virtual bool IsOffscreen() OVERRIDE; 55 virtual bool IsOffscreen() OVERRIDE;
55 virtual bool SwapBuffers() OVERRIDE; 56 virtual bool SwapBuffers() OVERRIDE;
56 virtual gfx::Size GetSize() OVERRIDE; 57 virtual gfx::Size GetSize() OVERRIDE;
57 virtual void* GetHandle() OVERRIDE; 58 virtual void* GetHandle() OVERRIDE;
58 virtual std::string GetExtensions() OVERRIDE; 59 virtual std::string GetExtensions() OVERRIDE;
59 virtual void* GetConfig() OVERRIDE; 60 virtual void* GetConfig() OVERRIDE;
60 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; 61 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
62 virtual bool GetSyncValues(int64* monotonicTime,
63 int64* mediaStreamCounter,
64 int64* swapBufferCounter) OVERRIDE;
61 65
62 protected: 66 protected:
63 NativeViewGLSurfaceGLX(); 67 NativeViewGLSurfaceGLX();
64 virtual ~NativeViewGLSurfaceGLX(); 68 virtual ~NativeViewGLSurfaceGLX();
65 69
66 gfx::AcceleratedWidget window_; 70 gfx::AcceleratedWidget window_;
67 71
68 private: 72 private:
69 void* config_; 73 void* config_;
70 gfx::Size size_; 74 gfx::Size size_;
(...skipping 22 matching lines...) Expand all
93 gfx::Size size_; 97 gfx::Size size_;
94 void* config_; 98 void* config_;
95 XID pbuffer_; 99 XID pbuffer_;
96 100
97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); 101 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX);
98 }; 102 };
99 103
100 } // namespace gfx 104 } // namespace gfx
101 105
102 #endif // UI_GL_GL_SURFACE_GLX_H_ 106 #endif // UI_GL_GL_SURFACE_GLX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698