| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SERVICE_CONTEXT_GROUP_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace gles2 { | 22 namespace gles2 { |
| 23 | 23 |
| 24 class GLES2Decoder; | 24 class GLES2Decoder; |
| 25 class BufferManager; | 25 class BufferManager; |
| 26 class FramebufferManager; | 26 class FramebufferManager; |
| 27 class RenderbufferManager; | 27 class RenderbufferManager; |
| 28 class ProgramManager; | 28 class ProgramManager; |
| 29 class ShaderManager; | 29 class ShaderManager; |
| 30 class TextureManager; | 30 class TextureManager; |
| 31 struct DisallowedExtensions; | 31 struct DisallowedFeatures; |
| 32 | 32 |
| 33 // A Context Group helps manage multiple GLES2Decoders that share | 33 // A Context Group helps manage multiple GLES2Decoders that share |
| 34 // resources. | 34 // resources. |
| 35 class ContextGroup : public base::RefCounted<ContextGroup> { | 35 class ContextGroup : public base::RefCounted<ContextGroup> { |
| 36 public: | 36 public: |
| 37 typedef scoped_refptr<ContextGroup> Ref; | 37 typedef scoped_refptr<ContextGroup> Ref; |
| 38 | 38 |
| 39 explicit ContextGroup(bool bind_generates_resource); | 39 explicit ContextGroup(bool bind_generates_resource); |
| 40 ~ContextGroup(); | 40 ~ContextGroup(); |
| 41 | 41 |
| 42 // This should only be called by GLES2Decoder. | 42 // This should only be called by GLES2Decoder. |
| 43 bool Initialize(const DisallowedExtensions& disallowed_extensions, | 43 bool Initialize(const DisallowedFeatures& disallowed_features, |
| 44 const char* allowed_features); | 44 const char* allowed_features); |
| 45 | 45 |
| 46 // Sets the ContextGroup has having a lost context. | 46 // Sets the ContextGroup has having a lost context. |
| 47 void set_have_context(bool have_context) { | 47 void set_have_context(bool have_context) { |
| 48 have_context_ = have_context; | 48 have_context_ = have_context; |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool bind_generates_resource() { | 51 bool bind_generates_resource() { |
| 52 return bind_generates_resource_; | 52 return bind_generates_resource_; |
| 53 } | 53 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 147 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace gles2 | 150 } // namespace gles2 |
| 151 } // namespace gpu | 151 } // namespace gpu |
| 152 | 152 |
| 153 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 153 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
| 154 | 154 |
| 155 | 155 |
| OLD | NEW |