| 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_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" |
| 11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 14 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 15 #include "gpu/command_buffer/service/gles2_cmd_validation.h" | 15 #include "gpu/command_buffer/service/gles2_cmd_validation.h" |
| 16 #include "gpu/command_buffer/service/feature_info.h" | 16 #include "gpu/command_buffer/service/feature_info.h" |
| 17 #include "gpu/gpu_export.h" |
| 17 | 18 |
| 18 namespace gpu { | 19 namespace gpu { |
| 19 | 20 |
| 20 class IdAllocatorInterface; | 21 class IdAllocatorInterface; |
| 21 | 22 |
| 22 namespace gles2 { | 23 namespace gles2 { |
| 23 | 24 |
| 24 class GLES2Decoder; | 25 class GLES2Decoder; |
| 25 class BufferManager; | 26 class BufferManager; |
| 26 class FramebufferManager; | 27 class FramebufferManager; |
| 27 class RenderbufferManager; | 28 class RenderbufferManager; |
| 28 class ProgramManager; | 29 class ProgramManager; |
| 29 class ShaderManager; | 30 class ShaderManager; |
| 30 class TextureManager; | 31 class TextureManager; |
| 31 struct DisallowedFeatures; | 32 struct DisallowedFeatures; |
| 32 | 33 |
| 33 // A Context Group helps manage multiple GLES2Decoders that share | 34 // A Context Group helps manage multiple GLES2Decoders that share |
| 34 // resources. | 35 // resources. |
| 35 class ContextGroup : public base::RefCounted<ContextGroup> { | 36 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { |
| 36 public: | 37 public: |
| 37 typedef scoped_refptr<ContextGroup> Ref; | 38 typedef scoped_refptr<ContextGroup> Ref; |
| 38 | 39 |
| 39 explicit ContextGroup(bool bind_generates_resource); | 40 explicit ContextGroup(bool bind_generates_resource); |
| 40 ~ContextGroup(); | 41 ~ContextGroup(); |
| 41 | 42 |
| 42 // This should only be called by GLES2Decoder. This must be paired with a | 43 // This should only be called by GLES2Decoder. This must be paired with a |
| 43 // call to destroy if it succeeds. | 44 // call to destroy if it succeeds. |
| 44 bool Initialize(const DisallowedFeatures& disallowed_features, | 45 bool Initialize(const DisallowedFeatures& disallowed_features, |
| 45 const char* allowed_features); | 46 const char* allowed_features); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 143 |
| 143 DISALLOW_COPY_AND_ASSIGN(ContextGroup); | 144 DISALLOW_COPY_AND_ASSIGN(ContextGroup); |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 } // namespace gles2 | 147 } // namespace gles2 |
| 147 } // namespace gpu | 148 } // namespace gpu |
| 148 | 149 |
| 149 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ | 150 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ |
| 150 | 151 |
| 151 | 152 |
| OLD | NEW |