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

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

Issue 197563003: gpu: Allow fences to check whether a flush has occurred (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: line brk Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_gl_api_implementation.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_GL_API_IMPLEMENTATION_H_ 5 #ifndef UI_GL_GL_GL_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 #include "ui/gl/gl_export.h" 10 #include "ui/gl/gl_export.h"
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 // Include the auto-generated part of this class. We split this because 35 // Include the auto-generated part of this class. We split this because
36 // it means we can easily edit the non-auto generated parts right here in 36 // it means we can easily edit the non-auto generated parts right here in
37 // this file instead of having to edit some template or the code generator. 37 // this file instead of having to edit some template or the code generator.
38 #include "gl_bindings_api_autogen_gl.h" 38 #include "gl_bindings_api_autogen_gl.h"
39 39
40 protected: 40 protected:
41 GLApiBase(); 41 GLApiBase();
42 virtual ~GLApiBase(); 42 virtual ~GLApiBase();
43 void InitializeBase(DriverGL* driver); 43 void InitializeBase(DriverGL* driver);
44 void SignalFlush();
44 45
45 DriverGL* driver_; 46 DriverGL* driver_;
46 }; 47 };
47 48
48 // Implemenents the GL API by calling directly into the driver. 49 // Implemenents the GL API by calling directly into the driver.
49 class GL_EXPORT RealGLApi : public GLApiBase { 50 class GL_EXPORT RealGLApi : public GLApiBase {
50 public: 51 public:
51 RealGLApi(); 52 RealGLApi();
52 virtual ~RealGLApi(); 53 virtual ~RealGLApi();
53 void Initialize(DriverGL* driver); 54 void Initialize(DriverGL* driver);
55
56 private:
57 virtual void glFinishFn() OVERRIDE;
58 virtual void glFlushFn() OVERRIDE;
54 }; 59 };
55 60
56 // Inserts a TRACE for every GL call. 61 // Inserts a TRACE for every GL call.
57 class GL_EXPORT TraceGLApi : public GLApi { 62 class GL_EXPORT TraceGLApi : public GLApi {
58 public: 63 public:
59 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { } 64 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { }
60 virtual ~TraceGLApi(); 65 virtual ~TraceGLApi();
61 66
62 // Include the auto-generated part of this class. We split this because 67 // Include the auto-generated part of this class. We split this because
63 // it means we can easily edit the non-auto generated parts right here in 68 // it means we can easily edit the non-auto generated parts right here in
(...skipping 11 matching lines...) Expand all
75 public: 80 public:
76 VirtualGLApi(); 81 VirtualGLApi();
77 virtual ~VirtualGLApi(); 82 virtual ~VirtualGLApi();
78 void Initialize(DriverGL* driver, GLContext* real_context); 83 void Initialize(DriverGL* driver, GLContext* real_context);
79 84
80 // Sets the current virutal context. 85 // Sets the current virutal context.
81 bool MakeCurrent(GLContext* virtual_context, GLSurface* surface); 86 bool MakeCurrent(GLContext* virtual_context, GLSurface* surface);
82 87
83 void OnReleaseVirtuallyCurrent(GLContext* virtual_context); 88 void OnReleaseVirtuallyCurrent(GLContext* virtual_context);
84 89
90 private:
85 // Overridden functions from GLApiBase 91 // Overridden functions from GLApiBase
86 virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE; 92 virtual const GLubyte* glGetStringFn(GLenum name) OVERRIDE;
93 virtual void glFinishFn() OVERRIDE;
94 virtual void glFlushFn() OVERRIDE;
87 95
88 private:
89 // The real context we're running on. 96 // The real context we're running on.
90 GLContext* real_context_; 97 GLContext* real_context_;
91 98
92 // The current virtual context. 99 // The current virtual context.
93 GLContext* current_context_; 100 GLContext* current_context_;
94 101
95 // The supported extensions being advertised for this virtual context. 102 // The supported extensions being advertised for this virtual context.
96 std::string extensions_; 103 std::string extensions_;
97 }; 104 };
98 105
99 } // namespace gfx 106 } // namespace gfx
100 107
101 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ 108 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_fence.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698