OLD | NEW |
---|---|
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_H_ | 5 #ifndef UI_GL_GL_SURFACE_H_ |
6 #define UI_GL_GL_SURFACE_H_ | 6 #define UI_GL_GL_SURFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 virtual unsigned int GetBackingFrameBufferObject(); | 68 virtual unsigned int GetBackingFrameBufferObject(); |
69 | 69 |
70 // Copy part of the backbuffer to the frontbuffer. | 70 // Copy part of the backbuffer to the frontbuffer. |
71 virtual bool PostSubBuffer(int x, int y, int width, int height); | 71 virtual bool PostSubBuffer(int x, int y, int width, int height); |
72 | 72 |
73 // Initialize GL bindings. | 73 // Initialize GL bindings. |
74 static bool InitializeOneOff(); | 74 static bool InitializeOneOff(); |
75 | 75 |
76 // Unit tests should call these instead of InitializeOneOff() to set up | 76 // Unit tests should call these instead of InitializeOneOff() to set up |
77 // GL bindings appropriate for tests. | 77 // GL bindings appropriate for tests. |
78 static void InitializeOneOffForTests(); | 78 static void InitializeOneOffForTests(bool disable_drawing = false); |
no sievers
2014/02/21 19:51:49
I thought the default param was against the style
danakj
2014/02/21 19:56:58
Ya kinda. But it's just for a bit, in test suites
Ken Russell (switch to Gerrit)
2014/02/21 20:03:37
It's fine as a temporary workaround, but please ad
danakj
2014/02/21 20:20:54
Thanks, good plan. Done!
| |
79 static void InitializeOneOffWithMockBindingsForTests(); | 79 static void InitializeOneOffWithMockBindingsForTests(); |
80 static void InitializeDynamicMockBindingsForTests(GLContext* context); | 80 static void InitializeDynamicMockBindingsForTests(GLContext* context); |
81 | 81 |
82 // Called after a context is made current with this surface. Returns false | 82 // Called after a context is made current with this surface. Returns false |
83 // on error. | 83 // on error. |
84 virtual bool OnMakeCurrent(GLContext* context); | 84 virtual bool OnMakeCurrent(GLContext* context); |
85 | 85 |
86 // Used for explicit buffer management. | 86 // Used for explicit buffer management. |
87 virtual bool SetBackbufferAllocation(bool allocated); | 87 virtual bool SetBackbufferAllocation(bool allocated); |
88 virtual void SetFrontbufferAllocation(bool allocated); | 88 virtual void SetFrontbufferAllocation(bool allocated); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 | 167 |
168 private: | 168 private: |
169 scoped_refptr<GLSurface> surface_; | 169 scoped_refptr<GLSurface> surface_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 171 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
172 }; | 172 }; |
173 | 173 |
174 } // namespace gfx | 174 } // namespace gfx |
175 | 175 |
176 #endif // UI_GL_GL_SURFACE_H_ | 176 #endif // UI_GL_GL_SURFACE_H_ |
OLD | NEW |