Index: gpu/command_buffer/client/gles2_implementation.h |
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h |
index 352a9473dd689727df55c9db0cfe265d469baba8..ba1aef834a696fa58a69c88904076a53c198ff0a 100644 |
--- a/gpu/command_buffer/client/gles2_implementation.h |
+++ b/gpu/command_buffer/client/gles2_implementation.h |
@@ -19,6 +19,7 @@ |
#include "../client/gles2_cmd_helper.h" |
#include "../client/query_tracker.h" |
#include "../client/ring_buffer.h" |
+#include "../client/share_group.h" |
#include "gles2_impl_export.h" |
#if !defined(NDEBUG) && !defined(__native_client__) && !defined(GLES2_CONFORMANCE_TESTS) // NOLINT |
@@ -83,24 +84,6 @@ class TransferBufferInterface; |
namespace gles2 { |
class ClientSideBufferHelper; |
-class ProgramInfoManager; |
-class ShareGroup; |
- |
-// Base class for IdHandlers |
-class IdHandlerInterface { |
- public: |
- IdHandlerInterface() { } |
- virtual ~IdHandlerInterface() { } |
- |
- // Makes some ids at or above id_offset. |
- virtual void MakeIds(GLuint id_offset, GLsizei n, GLuint* ids) = 0; |
- |
- // Frees some ids. |
- virtual bool FreeIds(GLsizei n, const GLuint* ids) = 0; |
- |
- // Marks an id as used for glBind functions. id = 0 does nothing. |
- virtual bool MarkAsUsedForBind(GLuint id) = 0; |
-}; |
// This class emulates GLES2 over command buffers. It can be used by a client |
// program so that the program does not need deal with shared memory and command |
@@ -209,15 +192,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation { |
GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, |
GLint* size, GLenum* type, char* name); |
- GLuint MakeTextureId() { |
- GLuint id; |
- id_handlers_[id_namespaces::kTextures]->MakeIds(0, 1, &id); |
- return id; |
- } |
- |
- void FreeTextureId(GLuint id) { |
- id_handlers_[id_namespaces::kTextures]->FreeIds(1, &id); |
- } |
+ GLuint MakeTextureId(); |
+ void FreeTextureId(GLuint id); |
void SetSharedMemoryChunkSizeMultiple(unsigned int multiple); |
@@ -454,10 +430,11 @@ class GLES2_IMPL_EXPORT GLES2Implementation { |
bool IsExtensionAvailable(const char* ext); |
+ IdHandlerInterface* GetIdHandler(int id_namespace) const; |
+ |
GLES2Util util_; |
GLES2CmdHelper* helper_; |
TransferBufferInterface* transfer_buffer_; |
- scoped_ptr<IdHandlerInterface> id_handlers_[id_namespaces::kNumIdNamespaces]; |
std::string last_error_; |
std::queue<int32> swap_buffers_tokens_; |
@@ -509,11 +486,6 @@ class GLES2_IMPL_EXPORT GLES2Implementation { |
// Whether or not to print debugging info. |
bool debug_; |
- // Whether or not this context is sharing resources. |
- bool sharing_resources_; |
- |
- bool bind_generates_resource_; |
- |
// Used to check for single threaded access. |
int use_count_; |
@@ -534,8 +506,6 @@ class GLES2_IMPL_EXPORT GLES2Implementation { |
scoped_ptr<MappedMemoryManager> mapped_memory_; |
- scoped_ptr<ProgramInfoManager> program_info_manager_; |
- |
scoped_refptr<ShareGroup> share_group_; |
scoped_ptr<QueryTracker> query_tracker_; |