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

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

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

Powered by Google App Engine
This is Rietveld 408576698