| 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 GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "gpu/command_buffer/service/feature_info.h" | 10 #include "gpu/command_buffer/service/feature_info.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 class ShareGroup; | 38 class ShareGroup; |
| 39 | 39 |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 class GLManager { | 42 class GLManager { |
| 43 public: | 43 public: |
| 44 struct Options { | 44 struct Options { |
| 45 Options(); | 45 Options(); |
| 46 // The size of the backbuffer. | 46 // The size of the backbuffer. |
| 47 gfx::Size size; | 47 gfx::Size size; |
| 48 // The amount of stencil buffer bits. Default is -1, no stencil buffer. |
| 49 int stencil_size; |
| 48 // If not null will share resources with this context. | 50 // If not null will share resources with this context. |
| 49 GLManager* share_group_manager; | 51 GLManager* share_group_manager; |
| 50 // If not null will share a mailbox manager with this context. | 52 // If not null will share a mailbox manager with this context. |
| 51 GLManager* share_mailbox_manager; | 53 GLManager* share_mailbox_manager; |
| 52 // If not null will create a virtual manager based on this context. | 54 // If not null will create a virtual manager based on this context. |
| 53 GLManager* virtual_manager; | 55 GLManager* virtual_manager; |
| 54 // Whether or not glBindXXX generates a resource. | 56 // Whether or not glBindXXX generates a resource. |
| 55 bool bind_generates_resource; | 57 bool bind_generates_resource; |
| 56 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs. | 58 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs. |
| 57 bool lose_context_when_out_of_memory; | 59 bool lose_context_when_out_of_memory; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Used on Android to virtualize GL for all contexts. | 117 // Used on Android to virtualize GL for all contexts. |
| 116 static int use_count_; | 118 static int use_count_; |
| 117 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; | 119 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; |
| 118 static scoped_refptr<gfx::GLSurface>* base_surface_; | 120 static scoped_refptr<gfx::GLSurface>* base_surface_; |
| 119 static scoped_refptr<gfx::GLContext>* base_context_; | 121 static scoped_refptr<gfx::GLContext>* base_context_; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 } // namespace gpu | 124 } // namespace gpu |
| 123 | 125 |
| 124 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ | 126 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ |
| OLD | NEW |