summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkkinnunen <kkinnunen@nvidia.com>2014-10-03 01:30:38 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-03 08:30:56 +0000
commit06d32878eeabdf9a12c76b8ee89bd5ac5b81d648 (patch)
tree3f204fef3a852d591d3160613d2cf7c8e3ff3510
parent28f92e19b5356243b4b90cd1b3824fab3dfd8e50 (diff)
downloadchromium_src-06d32878eeabdf9a12c76b8ee89bd5ac5b81d648.zip
chromium_src-06d32878eeabdf9a12c76b8ee89bd5ac5b81d648.tar.gz
chromium_src-06d32878eeabdf9a12c76b8ee89bd5ac5b81d648.tar.bz2
command_buffer: Remove unused shared id code (GenSharedIdsCHROMIUM, ...)
Remove unused shared id code from gpu command buffer. The functions removed are glGenSharedIdsCHROMIUM, glDeleteSharedIdsCHROMIUM, glRegisterSharedIdsCHROMIUM. The functions are not specified by the pseudo-extensions and it appears as if they have never been called. Also PPAPI does not expose these. This simplifies working with id generation logic. Removes the extra, unused id allocation for various id namespaces from the service side. Also fixes gpu process null pointer deref when the *SharedId commands would have an invalid namespace id. Review URL: https://codereview.chromium.org/621673002 Cr-Commit-Position: refs/heads/master@{#298012}
-rw-r--r--gpu/GLES2/gl2chromium_autogen.h3
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py30
-rw-r--r--gpu/command_buffer/client/gles2_c_lib_autogen.h28
-rw-r--r--gpu/command_buffer/client/gles2_cmd_helper_autogen.h34
-rw-r--r--gpu/command_buffer/client/gles2_implementation.cc83
-rw-r--r--gpu/command_buffer/client/gles2_implementation.h4
-rw-r--r--gpu/command_buffer/client/gles2_implementation_autogen.h13
-rw-r--r--gpu/command_buffer/client/gles2_implementation_impl_autogen.h2
-rw-r--r--gpu/command_buffer/client/gles2_implementation_unittest_autogen.h3
-rw-r--r--gpu/command_buffer/client/gles2_interface_autogen.h10
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_autogen.h10
-rw-r--r--gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h13
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_autogen.h10
-rw-r--r--gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h22
-rw-r--r--gpu/command_buffer/cmd_buffer_functions.txt3
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_autogen.h165
-rw-r--r--gpu/command_buffer/common/gles2_cmd_format_test_autogen.h55
-rw-r--r--gpu/command_buffer/common/gles2_cmd_ids_autogen.h75
-rw-r--r--gpu/command_buffer/common/id_allocator.cc33
-rw-r--r--gpu/command_buffer/common/id_allocator.h52
-rw-r--r--gpu/command_buffer/service/context_group.cc17
-rw-r--r--gpu/command_buffer/service/context_group.h6
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc140
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc118
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h10
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h4
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h4
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc1
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc1
32 files changed, 55 insertions, 897 deletions
diff --git a/gpu/GLES2/gl2chromium_autogen.h b/gpu/GLES2/gl2chromium_autogen.h
index 6080a04..ddc5730 100644
--- a/gpu/GLES2/gl2chromium_autogen.h
+++ b/gpu/GLES2/gl2chromium_autogen.h
@@ -182,9 +182,6 @@
#define glBindVertexArrayOES GLES2_GET_FUN(BindVertexArrayOES)
#define glSwapBuffers GLES2_GET_FUN(SwapBuffers)
#define glGetMaxValueInBufferCHROMIUM GLES2_GET_FUN(GetMaxValueInBufferCHROMIUM)
-#define glGenSharedIdsCHROMIUM GLES2_GET_FUN(GenSharedIdsCHROMIUM)
-#define glDeleteSharedIdsCHROMIUM GLES2_GET_FUN(DeleteSharedIdsCHROMIUM)
-#define glRegisterSharedIdsCHROMIUM GLES2_GET_FUN(RegisterSharedIdsCHROMIUM)
#define glEnableFeatureCHROMIUM GLES2_GET_FUN(EnableFeatureCHROMIUM)
#define glMapBufferCHROMIUM GLES2_GET_FUN(MapBufferCHROMIUM)
#define glUnmapBufferCHROMIUM GLES2_GET_FUN(UnmapBufferCHROMIUM)
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 4da6951..5c9e127 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1614,15 +1614,6 @@ _FUNCTION_INFO = {
'resource_types': 'Renderbuffers',
},
'DeleteShader': {'type': 'Delete', 'decoder_func': 'DoDeleteShader'},
- 'DeleteSharedIdsCHROMIUM': {
- 'type': 'Custom',
- 'decoder_func': 'DoDeleteSharedIdsCHROMIUM',
- 'impl_func': False,
- 'expectation': False,
- 'data_transfer_methods': ['shm'],
- 'extension': True,
- 'chromium': True,
- },
'DeleteTextures': {
'type': 'DELn',
'resource_type': 'Texture',
@@ -1731,15 +1722,6 @@ _FUNCTION_INFO = {
'resource_type': 'Texture',
'resource_types': 'Textures',
},
- 'GenSharedIdsCHROMIUM': {
- 'type': 'Custom',
- 'decoder_func': 'DoGenSharedIdsCHROMIUM',
- 'impl_func': False,
- 'expectation': False,
- 'data_transfer_methods': ['shm'],
- 'extension': True,
- 'chromium': True,
- },
'GetActiveAttrib': {
'type': 'Custom',
'data_transfer_methods': ['shm'],
@@ -2097,15 +2079,6 @@ _FUNCTION_INFO = {
'result': ['uint32_t'],
'defer_reads': True,
},
- 'RegisterSharedIdsCHROMIUM': {
- 'type': 'Custom',
- 'decoder_func': 'DoRegisterSharedIdsCHROMIUM',
- 'impl_func': False,
- 'expectation': False,
- 'data_transfer_methods': ['shm'],
- 'extension': True,
- 'chromium': True,
- },
'ReleaseShaderCompiler': {
'decoder_func': 'DoReleaseShaderCompiler',
'unit_test': False,
@@ -4195,7 +4168,8 @@ class GENnHandler(TypeHandler):
not_shared = func.GetInfo('not_shared')
if not_shared:
alloc_code = (
-""" IdAllocatorInterface* id_allocator = GetIdAllocator(id_namespaces::k%s);
+
+""" IdAllocator* id_allocator = GetIdAllocator(id_namespaces::k%s);
for (GLsizei ii = 0; ii < n; ++ii)
%s[ii] = id_allocator->AllocateID();""" %
(func.GetInfo('resource_types'), func.GetOriginalArgs()[1].name))
diff --git a/gpu/command_buffer/client/gles2_c_lib_autogen.h b/gpu/command_buffer/client/gles2_c_lib_autogen.h
index 565e775..e11cf63 100644
--- a/gpu/command_buffer/client/gles2_c_lib_autogen.h
+++ b/gpu/command_buffer/client/gles2_c_lib_autogen.h
@@ -712,22 +712,6 @@ GLuint GLES2GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
return gles2::GetGLContext()->GetMaxValueInBufferCHROMIUM(
buffer_id, count, type, offset);
}
-void GLES2GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) {
- gles2::GetGLContext()->GenSharedIdsCHROMIUM(namespace_id, id_offset, n, ids);
-}
-void GLES2DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) {
- gles2::GetGLContext()->DeleteSharedIdsCHROMIUM(namespace_id, n, ids);
-}
-void GLES2RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) {
- gles2::GetGLContext()->RegisterSharedIdsCHROMIUM(namespace_id, n, ids);
-}
GLboolean GLES2EnableFeatureCHROMIUM(const char* feature) {
return gles2::GetGLContext()->EnableFeatureCHROMIUM(feature);
}
@@ -1654,18 +1638,6 @@ extern const NameToFunc g_gles2_function_table[] = {
reinterpret_cast<GLES2FunctionPointer>(glGetMaxValueInBufferCHROMIUM),
},
{
- "glGenSharedIdsCHROMIUM",
- reinterpret_cast<GLES2FunctionPointer>(glGenSharedIdsCHROMIUM),
- },
- {
- "glDeleteSharedIdsCHROMIUM",
- reinterpret_cast<GLES2FunctionPointer>(glDeleteSharedIdsCHROMIUM),
- },
- {
- "glRegisterSharedIdsCHROMIUM",
- reinterpret_cast<GLES2FunctionPointer>(glRegisterSharedIdsCHROMIUM),
- },
- {
"glEnableFeatureCHROMIUM",
reinterpret_cast<GLES2FunctionPointer>(glEnableFeatureCHROMIUM),
},
diff --git a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
index 7510ad1..c8432da 100644
--- a/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
+++ b/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
@@ -1549,40 +1549,6 @@ void GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
}
}
-void GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- uint32_t ids_shm_id,
- uint32_t ids_shm_offset) {
- gles2::cmds::GenSharedIdsCHROMIUM* c =
- GetCmdSpace<gles2::cmds::GenSharedIdsCHROMIUM>();
- if (c) {
- c->Init(namespace_id, id_offset, n, ids_shm_id, ids_shm_offset);
- }
-}
-
-void DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- uint32_t ids_shm_id,
- uint32_t ids_shm_offset) {
- gles2::cmds::DeleteSharedIdsCHROMIUM* c =
- GetCmdSpace<gles2::cmds::DeleteSharedIdsCHROMIUM>();
- if (c) {
- c->Init(namespace_id, n, ids_shm_id, ids_shm_offset);
- }
-}
-
-void RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- uint32_t ids_shm_id,
- uint32_t ids_shm_offset) {
- gles2::cmds::RegisterSharedIdsCHROMIUM* c =
- GetCmdSpace<gles2::cmds::RegisterSharedIdsCHROMIUM>();
- if (c) {
- c->Init(namespace_id, n, ids_shm_id, ids_shm_offset);
- }
-}
-
void EnableFeatureCHROMIUM(GLuint bucket_id,
uint32_t result_shm_id,
uint32_t result_shm_offset) {
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index e83c30c..aabfa45 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -327,8 +327,7 @@ IdHandlerInterface* GLES2Implementation::GetIdHandler(int namespace_id) const {
return share_group_->GetIdHandler(namespace_id);
}
-IdAllocatorInterface* GLES2Implementation::GetIdAllocator(
- int namespace_id) const {
+IdAllocator* GLES2Implementation::GetIdAllocator(int namespace_id) const {
if (namespace_id == id_namespaces::kQueries)
return query_id_allocator_.get();
NOTREACHED();
@@ -954,86 +953,6 @@ void GLES2Implementation::SwapBuffers() {
}
}
-void GLES2Implementation::GenSharedIdsCHROMIUM(
- GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) {
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glGenSharedIdsCHROMIUM("
- << namespace_id << ", " << id_offset << ", " << n << ", " <<
- static_cast<void*>(ids) << ")");
- TRACE_EVENT0("gpu", "GLES2::GenSharedIdsCHROMIUM");
- GLsizei num = n;
- GLuint* dst = ids;
- while (num) {
- ScopedTransferBufferArray<GLint> id_buffer(num, helper_, transfer_buffer_);
- if (!id_buffer.valid()) {
- return;
- }
- helper_->GenSharedIdsCHROMIUM(
- namespace_id, id_offset, id_buffer.num_elements(),
- id_buffer.shm_id(), id_buffer.offset());
- WaitForCmd();
- memcpy(dst, id_buffer.address(), sizeof(*dst) * id_buffer.num_elements());
- num -= id_buffer.num_elements();
- dst += id_buffer.num_elements();
- }
- GPU_CLIENT_LOG_CODE_BLOCK({
- for (GLsizei i = 0; i < n; ++i) {
- GPU_CLIENT_LOG(" " << i << ": " << namespace_id << ", " << ids[i]);
- }
- });
-}
-
-void GLES2Implementation::DeleteSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids) {
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glDeleteSharedIdsCHROMIUM("
- << namespace_id << ", " << n << ", "
- << static_cast<const void*>(ids) << ")");
- GPU_CLIENT_LOG_CODE_BLOCK({
- for (GLsizei i = 0; i < n; ++i) {
- GPU_CLIENT_LOG(" " << i << ": " << namespace_id << ", " << ids[i]);
- }
- });
- TRACE_EVENT0("gpu", "GLES2::DeleteSharedIdsCHROMIUM");
- while (n) {
- ScopedTransferBufferArray<GLint> id_buffer(n, helper_, transfer_buffer_);
- if (!id_buffer.valid()) {
- return;
- }
- memcpy(id_buffer.address(), ids, sizeof(*ids) * id_buffer.num_elements());
- helper_->DeleteSharedIdsCHROMIUM(
- namespace_id, id_buffer.num_elements(),
- id_buffer.shm_id(), id_buffer.offset());
- WaitForCmd();
- n -= id_buffer.num_elements();
- ids += id_buffer.num_elements();
- }
-}
-
-void GLES2Implementation::RegisterSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids) {
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glRegisterSharedIdsCHROMIUM("
- << namespace_id << ", " << n << ", "
- << static_cast<const void*>(ids) << ")");
- GPU_CLIENT_LOG_CODE_BLOCK({
- for (GLsizei i = 0; i < n; ++i) {
- GPU_CLIENT_LOG(" " << i << ": " << namespace_id << ", " << ids[i]);
- }
- });
- TRACE_EVENT0("gpu", "GLES2::RegisterSharedIdsCHROMIUM");
- while (n) {
- ScopedTransferBufferArray<GLint> id_buffer(n, helper_, transfer_buffer_);
- if (!id_buffer.valid()) {
- return;
- }
- memcpy(id_buffer.address(), ids, sizeof(*ids) * id_buffer.num_elements());
- helper_->RegisterSharedIdsCHROMIUM(
- namespace_id, id_buffer.num_elements(),
- id_buffer.shm_id(), id_buffer.offset());
- WaitForCmd();
- n -= id_buffer.num_elements();
- ids += id_buffer.num_elements();
- }
-}
-
void GLES2Implementation::BindAttribLocation(
GLuint program, GLuint index, const char* name) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index ce0852a..84cda7e 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -599,7 +599,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
// IdAllocators for objects that can't be shared among contexts.
// For now, used only for Queries. TODO(hj.r.chung) Should be added for
// Framebuffer and Vertex array objects.
- IdAllocatorInterface* GetIdAllocator(int id_namespace) const;
+ IdAllocator* GetIdAllocator(int id_namespace) const;
void FinishHelper();
@@ -770,7 +770,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
scoped_ptr<QueryTracker> query_tracker_;
typedef std::map<GLuint, QueryTracker::Query*> QueryMap;
QueryMap current_queries_;
- scoped_ptr<IdAllocatorInterface> query_id_allocator_;
+ scoped_ptr<IdAllocator> query_id_allocator_;
scoped_ptr<BufferTracker> buffer_tracker_;
diff --git a/gpu/command_buffer/client/gles2_implementation_autogen.h b/gpu/command_buffer/client/gles2_implementation_autogen.h
index 24c02f5..0a53a86 100644
--- a/gpu/command_buffer/client/gles2_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_autogen.h
@@ -553,19 +553,6 @@ virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
GLenum type,
GLuint offset) OVERRIDE;
-virtual void GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) OVERRIDE;
-
-virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
-
-virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
-
virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE;
virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE;
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index b748d03..e63ba63 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -1842,7 +1842,7 @@ void GLES2Implementation::GenQueriesEXT(GLsizei n, GLuint* queries) {
return;
}
GPU_CLIENT_SINGLE_THREAD_CHECK();
- IdAllocatorInterface* id_allocator = GetIdAllocator(id_namespaces::kQueries);
+ IdAllocator* id_allocator = GetIdAllocator(id_namespaces::kQueries);
for (GLsizei ii = 0; ii < n; ++ii)
queries[ii] = id_allocator->AllocateID();
GenQueriesEXTHelper(n, queries);
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
index ba27559..a42d6d5 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -1742,9 +1742,6 @@ TEST_F(GLES2ImplementationTest, IsVertexArrayOES) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
EXPECT_TRUE(result);
}
-// TODO: Implement unit test for GenSharedIdsCHROMIUM
-// TODO: Implement unit test for DeleteSharedIdsCHROMIUM
-// TODO: Implement unit test for RegisterSharedIdsCHROMIUM
// TODO: Implement unit test for EnableFeatureCHROMIUM
TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) {
diff --git a/gpu/command_buffer/client/gles2_interface_autogen.h b/gpu/command_buffer/client/gles2_interface_autogen.h
index c64fdfc..abfc598 100644
--- a/gpu/command_buffer/client/gles2_interface_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_autogen.h
@@ -368,16 +368,6 @@ virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
GLsizei count,
GLenum type,
GLuint offset) = 0;
-virtual void GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) = 0;
-virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) = 0;
-virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) = 0;
virtual GLboolean EnableFeatureCHROMIUM(const char* feature) = 0;
virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) = 0;
virtual GLboolean UnmapBufferCHROMIUM(GLuint target) = 0;
diff --git a/gpu/command_buffer/client/gles2_interface_stub_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
index 16b7d60..67fc2da 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_autogen.h
@@ -399,16 +399,6 @@ virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
GLsizei count,
GLenum type,
GLuint offset) OVERRIDE;
-virtual void GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) OVERRIDE;
-virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
-virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE;
virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE;
virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE;
diff --git a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
index e1a07f6..cde303f 100644
--- a/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
@@ -652,19 +652,6 @@ GLuint GLES2InterfaceStub::GetMaxValueInBufferCHROMIUM(GLuint /* buffer_id */,
GLuint /* offset */) {
return 0;
}
-void GLES2InterfaceStub::GenSharedIdsCHROMIUM(GLuint /* namespace_id */,
- GLuint /* id_offset */,
- GLsizei /* n */,
- GLuint* /* ids */) {
-}
-void GLES2InterfaceStub::DeleteSharedIdsCHROMIUM(GLuint /* namespace_id */,
- GLsizei /* n */,
- const GLuint* /* ids */) {
-}
-void GLES2InterfaceStub::RegisterSharedIdsCHROMIUM(GLuint /* namespace_id */,
- GLsizei /* n */,
- const GLuint* /* ids */) {
-}
GLboolean GLES2InterfaceStub::EnableFeatureCHROMIUM(const char* /* feature */) {
return 0;
}
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
index c297d78c..1083251 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
@@ -399,16 +399,6 @@ virtual GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
GLsizei count,
GLenum type,
GLuint offset) OVERRIDE;
-virtual void GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) OVERRIDE;
-virtual void DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
-virtual void RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) OVERRIDE;
virtual GLboolean EnableFeatureCHROMIUM(const char* feature) OVERRIDE;
virtual void* MapBufferCHROMIUM(GLuint target, GLenum access) OVERRIDE;
virtual GLboolean UnmapBufferCHROMIUM(GLuint target) OVERRIDE;
diff --git a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
index 14d78c4..4495967 100644
--- a/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
@@ -1140,28 +1140,6 @@ GLuint GLES2TraceImplementation::GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
return gl_->GetMaxValueInBufferCHROMIUM(buffer_id, count, type, offset);
}
-void GLES2TraceImplementation::GenSharedIdsCHROMIUM(GLuint namespace_id,
- GLuint id_offset,
- GLsizei n,
- GLuint* ids) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::GenSharedIdsCHROMIUM");
- gl_->GenSharedIdsCHROMIUM(namespace_id, id_offset, n, ids);
-}
-
-void GLES2TraceImplementation::DeleteSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::DeleteSharedIdsCHROMIUM");
- gl_->DeleteSharedIdsCHROMIUM(namespace_id, n, ids);
-}
-
-void GLES2TraceImplementation::RegisterSharedIdsCHROMIUM(GLuint namespace_id,
- GLsizei n,
- const GLuint* ids) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::RegisterSharedIdsCHROMIUM");
- gl_->RegisterSharedIdsCHROMIUM(namespace_id, n, ids);
-}
-
GLboolean GLES2TraceImplementation::EnableFeatureCHROMIUM(const char* feature) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "GLES2Trace::EnableFeatureCHROMIUM");
return gl_->EnableFeatureCHROMIUM(feature);
diff --git a/gpu/command_buffer/cmd_buffer_functions.txt b/gpu/command_buffer/cmd_buffer_functions.txt
index b329d20..5964cd8 100644
--- a/gpu/command_buffer/cmd_buffer_functions.txt
+++ b/gpu/command_buffer/cmd_buffer_functions.txt
@@ -172,9 +172,6 @@ GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLidBindVertexArray ar
// Non-GL commands.
GL_APICALL void GL_APIENTRY glSwapBuffers (void);
GL_APICALL GLuint GL_APIENTRY glGetMaxValueInBufferCHROMIUM (GLidBuffer buffer_id, GLsizei count, GLenumGetMaxIndexType type, GLuint offset);
-GL_APICALL void GL_APIENTRY glGenSharedIdsCHROMIUM (GLuint namespace_id, GLuint id_offset, GLsizeiNotNegative n, GLuint* ids);
-GL_APICALL void GL_APIENTRY glDeleteSharedIdsCHROMIUM (GLuint namespace_id, GLsizeiNotNegative n, const GLuint* ids);
-GL_APICALL void GL_APIENTRY glRegisterSharedIdsCHROMIUM (GLuint namespace_id, GLsizeiNotNegative n, const GLuint* ids);
GL_APICALL GLboolean GL_APIENTRY glEnableFeatureCHROMIUM (const char* feature);
GL_APICALL void* GL_APIENTRY glMapBufferCHROMIUM (GLuint target, GLenum access);
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferCHROMIUM (GLuint target);
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 3dbe44d..ccdc040 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -7430,171 +7430,6 @@ COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_id) == 20,
COMPILE_ASSERT(offsetof(GetMaxValueInBufferCHROMIUM, result_shm_offset) == 24,
OffsetOf_GetMaxValueInBufferCHROMIUM_result_shm_offset_not_24);
-struct GenSharedIdsCHROMIUM {
- typedef GenSharedIdsCHROMIUM ValueType;
- static const CommandId kCmdId = kGenSharedIdsCHROMIUM;
- static const cmd::ArgFlags kArgFlags = cmd::kFixed;
- static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
-
- static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
- }
-
- void SetHeader() { header.SetCmd<ValueType>(); }
-
- void Init(GLuint _namespace_id,
- GLuint _id_offset,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- SetHeader();
- namespace_id = _namespace_id;
- id_offset = _id_offset;
- n = _n;
- ids_shm_id = _ids_shm_id;
- ids_shm_offset = _ids_shm_offset;
- }
-
- void* Set(void* cmd,
- GLuint _namespace_id,
- GLuint _id_offset,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- static_cast<ValueType*>(cmd)
- ->Init(_namespace_id, _id_offset, _n, _ids_shm_id, _ids_shm_offset);
- return NextCmdAddress<ValueType>(cmd);
- }
-
- gpu::CommandHeader header;
- uint32_t namespace_id;
- uint32_t id_offset;
- int32_t n;
- uint32_t ids_shm_id;
- uint32_t ids_shm_offset;
-};
-
-COMPILE_ASSERT(sizeof(GenSharedIdsCHROMIUM) == 24,
- Sizeof_GenSharedIdsCHROMIUM_is_not_24);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, header) == 0,
- OffsetOf_GenSharedIdsCHROMIUM_header_not_0);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, namespace_id) == 4,
- OffsetOf_GenSharedIdsCHROMIUM_namespace_id_not_4);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, id_offset) == 8,
- OffsetOf_GenSharedIdsCHROMIUM_id_offset_not_8);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, n) == 12,
- OffsetOf_GenSharedIdsCHROMIUM_n_not_12);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_id) == 16,
- OffsetOf_GenSharedIdsCHROMIUM_ids_shm_id_not_16);
-COMPILE_ASSERT(offsetof(GenSharedIdsCHROMIUM, ids_shm_offset) == 20,
- OffsetOf_GenSharedIdsCHROMIUM_ids_shm_offset_not_20);
-
-struct DeleteSharedIdsCHROMIUM {
- typedef DeleteSharedIdsCHROMIUM ValueType;
- static const CommandId kCmdId = kDeleteSharedIdsCHROMIUM;
- static const cmd::ArgFlags kArgFlags = cmd::kFixed;
- static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
-
- static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
- }
-
- void SetHeader() { header.SetCmd<ValueType>(); }
-
- void Init(GLuint _namespace_id,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- SetHeader();
- namespace_id = _namespace_id;
- n = _n;
- ids_shm_id = _ids_shm_id;
- ids_shm_offset = _ids_shm_offset;
- }
-
- void* Set(void* cmd,
- GLuint _namespace_id,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- static_cast<ValueType*>(cmd)
- ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
- return NextCmdAddress<ValueType>(cmd);
- }
-
- gpu::CommandHeader header;
- uint32_t namespace_id;
- int32_t n;
- uint32_t ids_shm_id;
- uint32_t ids_shm_offset;
-};
-
-COMPILE_ASSERT(sizeof(DeleteSharedIdsCHROMIUM) == 20,
- Sizeof_DeleteSharedIdsCHROMIUM_is_not_20);
-COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, header) == 0,
- OffsetOf_DeleteSharedIdsCHROMIUM_header_not_0);
-COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, namespace_id) == 4,
- OffsetOf_DeleteSharedIdsCHROMIUM_namespace_id_not_4);
-COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, n) == 8,
- OffsetOf_DeleteSharedIdsCHROMIUM_n_not_8);
-COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_id) == 12,
- OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_id_not_12);
-COMPILE_ASSERT(offsetof(DeleteSharedIdsCHROMIUM, ids_shm_offset) == 16,
- OffsetOf_DeleteSharedIdsCHROMIUM_ids_shm_offset_not_16);
-
-struct RegisterSharedIdsCHROMIUM {
- typedef RegisterSharedIdsCHROMIUM ValueType;
- static const CommandId kCmdId = kRegisterSharedIdsCHROMIUM;
- static const cmd::ArgFlags kArgFlags = cmd::kFixed;
- static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
-
- static uint32_t ComputeSize() {
- return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
- }
-
- void SetHeader() { header.SetCmd<ValueType>(); }
-
- void Init(GLuint _namespace_id,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- SetHeader();
- namespace_id = _namespace_id;
- n = _n;
- ids_shm_id = _ids_shm_id;
- ids_shm_offset = _ids_shm_offset;
- }
-
- void* Set(void* cmd,
- GLuint _namespace_id,
- GLsizei _n,
- uint32_t _ids_shm_id,
- uint32_t _ids_shm_offset) {
- static_cast<ValueType*>(cmd)
- ->Init(_namespace_id, _n, _ids_shm_id, _ids_shm_offset);
- return NextCmdAddress<ValueType>(cmd);
- }
-
- gpu::CommandHeader header;
- uint32_t namespace_id;
- int32_t n;
- uint32_t ids_shm_id;
- uint32_t ids_shm_offset;
-};
-
-COMPILE_ASSERT(sizeof(RegisterSharedIdsCHROMIUM) == 20,
- Sizeof_RegisterSharedIdsCHROMIUM_is_not_20);
-COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, header) == 0,
- OffsetOf_RegisterSharedIdsCHROMIUM_header_not_0);
-COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, namespace_id) == 4,
- OffsetOf_RegisterSharedIdsCHROMIUM_namespace_id_not_4);
-COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, n) == 8,
- OffsetOf_RegisterSharedIdsCHROMIUM_n_not_8);
-COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_id) == 12,
- OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_id_not_12);
-COMPILE_ASSERT(offsetof(RegisterSharedIdsCHROMIUM, ids_shm_offset) == 16,
- OffsetOf_RegisterSharedIdsCHROMIUM_ids_shm_offset_not_16);
-
struct EnableFeatureCHROMIUM {
typedef EnableFeatureCHROMIUM ValueType;
static const CommandId kCmdId = kEnableFeatureCHROMIUM;
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index 5211286..7b7845b 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -2664,61 +2664,6 @@ TEST_F(GLES2FormatTest, GetMaxValueInBufferCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
-TEST_F(GLES2FormatTest, GenSharedIdsCHROMIUM) {
- cmds::GenSharedIdsCHROMIUM& cmd = *GetBufferAs<cmds::GenSharedIdsCHROMIUM>();
- void* next_cmd = cmd.Set(&cmd,
- static_cast<GLuint>(11),
- static_cast<GLuint>(12),
- static_cast<GLsizei>(13),
- static_cast<uint32_t>(14),
- static_cast<uint32_t>(15));
- EXPECT_EQ(static_cast<uint32_t>(cmds::GenSharedIdsCHROMIUM::kCmdId),
- cmd.header.command);
- EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
- EXPECT_EQ(static_cast<GLuint>(11), cmd.namespace_id);
- EXPECT_EQ(static_cast<GLuint>(12), cmd.id_offset);
- EXPECT_EQ(static_cast<GLsizei>(13), cmd.n);
- EXPECT_EQ(static_cast<uint32_t>(14), cmd.ids_shm_id);
- EXPECT_EQ(static_cast<uint32_t>(15), cmd.ids_shm_offset);
- CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
-}
-
-TEST_F(GLES2FormatTest, DeleteSharedIdsCHROMIUM) {
- cmds::DeleteSharedIdsCHROMIUM& cmd =
- *GetBufferAs<cmds::DeleteSharedIdsCHROMIUM>();
- void* next_cmd = cmd.Set(&cmd,
- static_cast<GLuint>(11),
- static_cast<GLsizei>(12),
- static_cast<uint32_t>(13),
- static_cast<uint32_t>(14));
- EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteSharedIdsCHROMIUM::kCmdId),
- cmd.header.command);
- EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
- EXPECT_EQ(static_cast<GLuint>(11), cmd.namespace_id);
- EXPECT_EQ(static_cast<GLsizei>(12), cmd.n);
- EXPECT_EQ(static_cast<uint32_t>(13), cmd.ids_shm_id);
- EXPECT_EQ(static_cast<uint32_t>(14), cmd.ids_shm_offset);
- CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
-}
-
-TEST_F(GLES2FormatTest, RegisterSharedIdsCHROMIUM) {
- cmds::RegisterSharedIdsCHROMIUM& cmd =
- *GetBufferAs<cmds::RegisterSharedIdsCHROMIUM>();
- void* next_cmd = cmd.Set(&cmd,
- static_cast<GLuint>(11),
- static_cast<GLsizei>(12),
- static_cast<uint32_t>(13),
- static_cast<uint32_t>(14));
- EXPECT_EQ(static_cast<uint32_t>(cmds::RegisterSharedIdsCHROMIUM::kCmdId),
- cmd.header.command);
- EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
- EXPECT_EQ(static_cast<GLuint>(11), cmd.namespace_id);
- EXPECT_EQ(static_cast<GLsizei>(12), cmd.n);
- EXPECT_EQ(static_cast<uint32_t>(13), cmd.ids_shm_id);
- EXPECT_EQ(static_cast<uint32_t>(14), cmd.ids_shm_offset);
- CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
-}
-
TEST_F(GLES2FormatTest, EnableFeatureCHROMIUM) {
cmds::EnableFeatureCHROMIUM& cmd =
*GetBufferAs<cmds::EnableFeatureCHROMIUM>();
diff --git a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
index 474df6d..030ada2 100644
--- a/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_ids_autogen.h
@@ -174,45 +174,42 @@
OP(BindVertexArrayOES) /* 415 */ \
OP(SwapBuffers) /* 416 */ \
OP(GetMaxValueInBufferCHROMIUM) /* 417 */ \
- OP(GenSharedIdsCHROMIUM) /* 418 */ \
- OP(DeleteSharedIdsCHROMIUM) /* 419 */ \
- OP(RegisterSharedIdsCHROMIUM) /* 420 */ \
- OP(EnableFeatureCHROMIUM) /* 421 */ \
- OP(ResizeCHROMIUM) /* 422 */ \
- OP(GetRequestableExtensionsCHROMIUM) /* 423 */ \
- OP(RequestExtensionCHROMIUM) /* 424 */ \
- OP(GetMultipleIntegervCHROMIUM) /* 425 */ \
- OP(GetProgramInfoCHROMIUM) /* 426 */ \
- OP(GetTranslatedShaderSourceANGLE) /* 427 */ \
- OP(PostSubBufferCHROMIUM) /* 428 */ \
- OP(TexImageIOSurface2DCHROMIUM) /* 429 */ \
- OP(CopyTextureCHROMIUM) /* 430 */ \
- OP(DrawArraysInstancedANGLE) /* 431 */ \
- OP(DrawElementsInstancedANGLE) /* 432 */ \
- OP(VertexAttribDivisorANGLE) /* 433 */ \
- OP(GenMailboxCHROMIUM) /* 434 */ \
- OP(ProduceTextureCHROMIUMImmediate) /* 435 */ \
- OP(ProduceTextureDirectCHROMIUMImmediate) /* 436 */ \
- OP(ConsumeTextureCHROMIUMImmediate) /* 437 */ \
- OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 438 */ \
- OP(BindUniformLocationCHROMIUMBucket) /* 439 */ \
- OP(BindTexImage2DCHROMIUM) /* 440 */ \
- OP(ReleaseTexImage2DCHROMIUM) /* 441 */ \
- OP(TraceBeginCHROMIUM) /* 442 */ \
- OP(TraceEndCHROMIUM) /* 443 */ \
- OP(AsyncTexSubImage2DCHROMIUM) /* 444 */ \
- OP(AsyncTexImage2DCHROMIUM) /* 445 */ \
- OP(WaitAsyncTexImage2DCHROMIUM) /* 446 */ \
- OP(WaitAllAsyncTexImage2DCHROMIUM) /* 447 */ \
- OP(DiscardFramebufferEXTImmediate) /* 448 */ \
- OP(LoseContextCHROMIUM) /* 449 */ \
- OP(InsertSyncPointCHROMIUM) /* 450 */ \
- OP(WaitSyncPointCHROMIUM) /* 451 */ \
- OP(DrawBuffersEXTImmediate) /* 452 */ \
- OP(DiscardBackbufferCHROMIUM) /* 453 */ \
- OP(ScheduleOverlayPlaneCHROMIUM) /* 454 */ \
- OP(MatrixLoadfCHROMIUMImmediate) /* 455 */ \
- OP(MatrixLoadIdentityCHROMIUM) /* 456 */
+ OP(EnableFeatureCHROMIUM) /* 418 */ \
+ OP(ResizeCHROMIUM) /* 419 */ \
+ OP(GetRequestableExtensionsCHROMIUM) /* 420 */ \
+ OP(RequestExtensionCHROMIUM) /* 421 */ \
+ OP(GetMultipleIntegervCHROMIUM) /* 422 */ \
+ OP(GetProgramInfoCHROMIUM) /* 423 */ \
+ OP(GetTranslatedShaderSourceANGLE) /* 424 */ \
+ OP(PostSubBufferCHROMIUM) /* 425 */ \
+ OP(TexImageIOSurface2DCHROMIUM) /* 426 */ \
+ OP(CopyTextureCHROMIUM) /* 427 */ \
+ OP(DrawArraysInstancedANGLE) /* 428 */ \
+ OP(DrawElementsInstancedANGLE) /* 429 */ \
+ OP(VertexAttribDivisorANGLE) /* 430 */ \
+ OP(GenMailboxCHROMIUM) /* 431 */ \
+ OP(ProduceTextureCHROMIUMImmediate) /* 432 */ \
+ OP(ProduceTextureDirectCHROMIUMImmediate) /* 433 */ \
+ OP(ConsumeTextureCHROMIUMImmediate) /* 434 */ \
+ OP(CreateAndConsumeTextureCHROMIUMImmediate) /* 435 */ \
+ OP(BindUniformLocationCHROMIUMBucket) /* 436 */ \
+ OP(BindTexImage2DCHROMIUM) /* 437 */ \
+ OP(ReleaseTexImage2DCHROMIUM) /* 438 */ \
+ OP(TraceBeginCHROMIUM) /* 439 */ \
+ OP(TraceEndCHROMIUM) /* 440 */ \
+ OP(AsyncTexSubImage2DCHROMIUM) /* 441 */ \
+ OP(AsyncTexImage2DCHROMIUM) /* 442 */ \
+ OP(WaitAsyncTexImage2DCHROMIUM) /* 443 */ \
+ OP(WaitAllAsyncTexImage2DCHROMIUM) /* 444 */ \
+ OP(DiscardFramebufferEXTImmediate) /* 445 */ \
+ OP(LoseContextCHROMIUM) /* 446 */ \
+ OP(InsertSyncPointCHROMIUM) /* 447 */ \
+ OP(WaitSyncPointCHROMIUM) /* 448 */ \
+ OP(DrawBuffersEXTImmediate) /* 449 */ \
+ OP(DiscardBackbufferCHROMIUM) /* 450 */ \
+ OP(ScheduleOverlayPlaneCHROMIUM) /* 451 */ \
+ OP(MatrixLoadfCHROMIUMImmediate) /* 452 */ \
+ OP(MatrixLoadIdentityCHROMIUM) /* 453 */
enum CommandId {
kStartPoint = cmd::kLastCommonId, // All GLES2 commands start after this.
diff --git a/gpu/command_buffer/common/id_allocator.cc b/gpu/command_buffer/common/id_allocator.cc
index 7802e17..507b14e 100644
--- a/gpu/command_buffer/common/id_allocator.cc
+++ b/gpu/command_buffer/common/id_allocator.cc
@@ -10,9 +10,6 @@
namespace gpu {
-IdAllocatorInterface::~IdAllocatorInterface() {
-}
-
IdAllocator::IdAllocator() {}
IdAllocator::~IdAllocator() {}
@@ -89,34 +86,4 @@ ResourceId IdAllocator::FindFirstUnusedId() const {
return id;
}
-NonReusedIdAllocator::NonReusedIdAllocator() : last_id_(0) {
-}
-
-NonReusedIdAllocator::~NonReusedIdAllocator() {
-}
-
-ResourceId NonReusedIdAllocator::AllocateID() {
- return ++last_id_;
-}
-
-ResourceId NonReusedIdAllocator::AllocateIDAtOrAbove(ResourceId desired_id) {
- if (desired_id > last_id_)
- last_id_ = desired_id;
-
- return ++last_id_;
-}
-
-bool NonReusedIdAllocator::MarkAsUsed(ResourceId id) {
- NOTREACHED();
- return false;
-}
-
-void NonReusedIdAllocator::FreeID(ResourceId id) {
-}
-
-bool NonReusedIdAllocator::InUse(ResourceId id) const {
- NOTREACHED();
- return false;
-}
-
} // namespace gpu
diff --git a/gpu/command_buffer/common/id_allocator.h b/gpu/command_buffer/common/id_allocator.h
index 3f2dc4a..b8770830 100644
--- a/gpu/command_buffer/common/id_allocator.h
+++ b/gpu/command_buffer/common/id_allocator.h
@@ -23,39 +23,27 @@ typedef uint32_t ResourceId;
// Invalid resource ID.
static const ResourceId kInvalidResource = 0u;
-class GPU_EXPORT IdAllocatorInterface {
+// A class to manage the allocation of resource IDs.
+class GPU_EXPORT IdAllocator {
public:
- virtual ~IdAllocatorInterface();
+ IdAllocator();
+ ~IdAllocator();
// Allocates a new resource ID.
- virtual ResourceId AllocateID() = 0;
+ ResourceId AllocateID();
// Allocates an Id starting at or above desired_id.
// Note: may wrap if it starts near limit.
- virtual ResourceId AllocateIDAtOrAbove(ResourceId desired_id) = 0;
+ ResourceId AllocateIDAtOrAbove(ResourceId desired_id);
// Marks an id as used. Returns false if id was already used.
- virtual bool MarkAsUsed(ResourceId id) = 0;
+ bool MarkAsUsed(ResourceId id);
// Frees a resource ID.
- virtual void FreeID(ResourceId id) = 0;
+ void FreeID(ResourceId id);
// Checks whether or not a resource ID is in use.
- virtual bool InUse(ResourceId id) const = 0;
-};
-
-// A class to manage the allocation of resource IDs.
-class GPU_EXPORT IdAllocator : public IdAllocatorInterface {
- public:
- IdAllocator();
- virtual ~IdAllocator();
-
- // Implement IdAllocatorInterface.
- virtual ResourceId AllocateID() OVERRIDE;
- virtual ResourceId AllocateIDAtOrAbove(ResourceId desired_id) OVERRIDE;
- virtual bool MarkAsUsed(ResourceId id) OVERRIDE;
- virtual void FreeID(ResourceId id) OVERRIDE;
- virtual bool InUse(ResourceId id) const OVERRIDE;
+ bool InUse(ResourceId id) const;
private:
// TODO(gman): This would work much better with ranges or a hash table.
@@ -73,28 +61,6 @@ class GPU_EXPORT IdAllocator : public IdAllocatorInterface {
DISALLOW_COPY_AND_ASSIGN(IdAllocator);
};
-// A class to manage the allocation of resource IDs that are never reused. This
-// implementation does not track which IDs are currently used. It is useful for
-// shared and programs which cannot be implicitly created by binding a
-// previously unused ID.
-class NonReusedIdAllocator : public IdAllocatorInterface {
- public:
- NonReusedIdAllocator();
- virtual ~NonReusedIdAllocator();
-
- // Implement IdAllocatorInterface.
- virtual ResourceId AllocateID() OVERRIDE;
- virtual ResourceId AllocateIDAtOrAbove(ResourceId desired_id) OVERRIDE;
- virtual bool MarkAsUsed(ResourceId id) OVERRIDE;
- virtual void FreeID(ResourceId id) OVERRIDE;
- virtual bool InUse(ResourceId id) const OVERRIDE;
-
- private:
- ResourceId last_id_;
-
- DISALLOW_COPY_AND_ASSIGN(NonReusedIdAllocator);
-};
-
} // namespace gpu
#endif // GPU_COMMAND_BUFFER_CLIENT_ID_ALLOCATOR_H_
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc
index 5225896..fe692be 100644
--- a/gpu/command_buffer/service/context_group.cc
+++ b/gpu/command_buffer/service/context_group.cc
@@ -10,7 +10,6 @@
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/buffer_manager.h"
#include "gpu/command_buffer/service/framebuffer_manager.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
@@ -60,15 +59,6 @@ ContextGroup::ContextGroup(
transfer_buffer_manager_.reset(manager);
manager->Initialize();
}
-
- id_namespaces_[id_namespaces::kBuffers].reset(new IdAllocator);
- id_namespaces_[id_namespaces::kFramebuffers].reset(new IdAllocator);
- id_namespaces_[id_namespaces::kProgramsAndShaders].reset(
- new NonReusedIdAllocator);
- id_namespaces_[id_namespaces::kRenderbuffers].reset(new IdAllocator);
- id_namespaces_[id_namespaces::kTextures].reset(new IdAllocator);
- id_namespaces_[id_namespaces::kQueries].reset(new IdAllocator);
- id_namespaces_[id_namespaces::kVertexArrays].reset(new IdAllocator);
}
static void GetIntegerv(GLenum pname, uint32* var) {
@@ -328,13 +318,6 @@ void ContextGroup::Destroy(GLES2Decoder* decoder, bool have_context) {
memory_tracker_ = NULL;
}
-IdAllocatorInterface* ContextGroup::GetIdAllocator(unsigned namespace_id) {
- if (namespace_id >= arraysize(id_namespaces_))
- return NULL;
-
- return id_namespaces_[namespace_id].get();
-}
-
uint32 ContextGroup::GetMemRepresented() const {
uint32 total = 0;
if (buffer_manager_.get())
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 163e7de..ae4550c 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -21,7 +21,6 @@
namespace gpu {
-class IdAllocatorInterface;
class TransferBufferManagerInterface;
namespace gles2 {
@@ -151,8 +150,6 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
return transfer_buffer_manager_.get();
}
- IdAllocatorInterface* GetIdAllocator(unsigned namespace_id);
-
uint32 GetMemRepresented() const;
// Loses all the context associated with this group.
@@ -208,9 +205,6 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
scoped_ptr<ShaderManager> shader_manager_;
- linked_ptr<IdAllocatorInterface>
- id_namespaces_[id_namespaces::kNumIdNamespaces];
-
scoped_refptr<FeatureInfo> feature_info_;
std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index d4c0e98..9bf037f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1270,10 +1270,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
// Wrapper for glCompileShader.
void DoCompileShader(GLuint shader);
- // Helper for DeleteSharedIdsCHROMIUM commands.
- void DoDeleteSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids);
-
// Wrapper for glDetachShader
void DoDetachShader(GLuint client_program_id, GLint client_shader_id);
@@ -1324,10 +1320,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
// Wrapper for glGenerateMipmap
void DoGenerateMipmap(GLenum target);
- // Helper for GenSharedIdsCHROMIUM commands.
- void DoGenSharedIdsCHROMIUM(
- GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids);
-
// Helper for DoGetBooleanv, Floatv, and Intergerv to adjust pname
// to account for different pname values defined in different extension
// variants.
@@ -1387,10 +1379,6 @@ class GLES2DecoderImpl : public GLES2Decoder,
// Wrapper for glLinkProgram
void DoLinkProgram(GLuint program);
- // Helper for RegisterSharedIdsCHROMIUM.
- void DoRegisterSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids);
-
// Wrapper for glRenderbufferStorage.
void DoRenderbufferStorage(
GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
@@ -3954,9 +3942,6 @@ void GLES2DecoderImpl::DoBindBuffer(GLenum target, GLuint client_id) {
glGenBuffersARB(1, &service_id);
CreateBuffer(client_id, service_id);
buffer = GetBuffer(client_id);
- IdAllocatorInterface* id_allocator =
- group_->GetIdAllocator(id_namespaces::kBuffers);
- id_allocator->MarkAsUsed(client_id);
}
}
LogClientServiceForInfo(buffer, client_id, "glBindBuffer");
@@ -4158,9 +4143,6 @@ void GLES2DecoderImpl::DoBindFramebuffer(GLenum target, GLuint client_id) {
glGenFramebuffersEXT(1, &service_id);
CreateFramebuffer(client_id, service_id);
framebuffer = GetFramebuffer(client_id);
- IdAllocatorInterface* id_allocator =
- group_->GetIdAllocator(id_namespaces::kFramebuffers);
- id_allocator->MarkAsUsed(client_id);
} else {
service_id = framebuffer->service_id();
}
@@ -4206,9 +4188,6 @@ void GLES2DecoderImpl::DoBindRenderbuffer(GLenum target, GLuint client_id) {
glGenRenderbuffersEXT(1, &service_id);
CreateRenderbuffer(client_id, service_id);
renderbuffer = GetRenderbuffer(client_id);
- IdAllocatorInterface* id_allocator =
- group_->GetIdAllocator(id_namespaces::kRenderbuffers);
- id_allocator->MarkAsUsed(client_id);
} else {
service_id = renderbuffer->service_id();
}
@@ -4238,9 +4217,6 @@ void GLES2DecoderImpl::DoBindTexture(GLenum target, GLuint client_id) {
DCHECK_NE(0u, service_id);
CreateTexture(client_id, service_id);
texture_ref = GetTexture(client_id);
- IdAllocatorInterface* id_allocator =
- group_->GetIdAllocator(id_namespaces::kTextures);
- id_allocator->MarkAsUsed(client_id);
}
} else {
texture_ref = texture_manager()->GetDefaultTextureInfo(target);
@@ -4998,118 +4974,6 @@ error::Error GLES2DecoderImpl::HandleDeleteProgram(uint32 immediate_data_size,
return error::kNoError;
}
-void GLES2DecoderImpl::DoDeleteSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids) {
- IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
- for (GLsizei ii = 0; ii < n; ++ii) {
- id_allocator->FreeID(ids[ii]);
- }
-}
-
-error::Error GLES2DecoderImpl::HandleDeleteSharedIdsCHROMIUM(
- uint32 immediate_data_size,
- const void* cmd_data) {
- const gles2::cmds::DeleteSharedIdsCHROMIUM& c =
- *static_cast<const gles2::cmds::DeleteSharedIdsCHROMIUM*>(cmd_data);
- GLuint namespace_id = static_cast<GLuint>(c.namespace_id);
- GLsizei n = static_cast<GLsizei>(c.n);
- uint32 data_size;
- if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
- return error::kOutOfBounds;
- }
- const GLuint* ids = GetSharedMemoryAs<const GLuint*>(
- c.ids_shm_id, c.ids_shm_offset, data_size);
- if (n < 0) {
- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "DeleteSharedIdsCHROMIUM", "n < 0");
- return error::kNoError;
- }
- if (ids == NULL) {
- return error::kOutOfBounds;
- }
- DoDeleteSharedIdsCHROMIUM(namespace_id, n, ids);
- return error::kNoError;
-}
-
-void GLES2DecoderImpl::DoGenSharedIdsCHROMIUM(
- GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) {
- IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
- if (id_offset == 0) {
- for (GLsizei ii = 0; ii < n; ++ii) {
- ids[ii] = id_allocator->AllocateID();
- }
- } else {
- for (GLsizei ii = 0; ii < n; ++ii) {
- ids[ii] = id_allocator->AllocateIDAtOrAbove(id_offset);
- id_offset = ids[ii] + 1;
- }
- }
-}
-
-error::Error GLES2DecoderImpl::HandleGenSharedIdsCHROMIUM(
- uint32 immediate_data_size,
- const void* cmd_data) {
- const gles2::cmds::GenSharedIdsCHROMIUM& c =
- *static_cast<const gles2::cmds::GenSharedIdsCHROMIUM*>(cmd_data);
- GLuint namespace_id = static_cast<GLuint>(c.namespace_id);
- GLuint id_offset = static_cast<GLuint>(c.id_offset);
- GLsizei n = static_cast<GLsizei>(c.n);
- uint32 data_size;
- if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
- return error::kOutOfBounds;
- }
- GLuint* ids = GetSharedMemoryAs<GLuint*>(
- c.ids_shm_id, c.ids_shm_offset, data_size);
- if (n < 0) {
- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "GenSharedIdsCHROMIUM", "n < 0");
- return error::kNoError;
- }
- if (ids == NULL) {
- return error::kOutOfBounds;
- }
- DoGenSharedIdsCHROMIUM(namespace_id, id_offset, n, ids);
- return error::kNoError;
-}
-
-void GLES2DecoderImpl::DoRegisterSharedIdsCHROMIUM(
- GLuint namespace_id, GLsizei n, const GLuint* ids) {
- IdAllocatorInterface* id_allocator = group_->GetIdAllocator(namespace_id);
- for (GLsizei ii = 0; ii < n; ++ii) {
- if (!id_allocator->MarkAsUsed(ids[ii])) {
- for (GLsizei jj = 0; jj < ii; ++jj) {
- id_allocator->FreeID(ids[jj]);
- }
- LOCAL_SET_GL_ERROR(
- GL_INVALID_VALUE, "RegisterSharedIdsCHROMIUM",
- "attempt to register id that already exists");
- return;
- }
- }
-}
-
-error::Error GLES2DecoderImpl::HandleRegisterSharedIdsCHROMIUM(
- uint32 immediate_data_size,
- const void* cmd_data) {
- const gles2::cmds::RegisterSharedIdsCHROMIUM& c =
- *static_cast<const gles2::cmds::RegisterSharedIdsCHROMIUM*>(cmd_data);
- GLuint namespace_id = static_cast<GLuint>(c.namespace_id);
- GLsizei n = static_cast<GLsizei>(c.n);
- uint32 data_size;
- if (!SafeMultiplyUint32(n, sizeof(GLuint), &data_size)) {
- return error::kOutOfBounds;
- }
- GLuint* ids = GetSharedMemoryAs<GLuint*>(
- c.ids_shm_id, c.ids_shm_offset, data_size);
- if (n < 0) {
- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "RegisterSharedIdsCHROMIUM", "n < 0");
- return error::kNoError;
- }
- if (ids == NULL) {
- return error::kOutOfBounds;
- }
- DoRegisterSharedIdsCHROMIUM(namespace_id, n, ids);
- return error::kNoError;
-}
-
error::Error GLES2DecoderImpl::DoClear(GLbitfield mask) {
DCHECK(!ShouldDeferDraws());
if (CheckBoundFramebuffersValid("glClear")) {
@@ -10722,10 +10586,6 @@ void GLES2DecoderImpl::DoCreateAndConsumeTextureCHROMIUM(GLenum target,
return;
}
- IdAllocatorInterface* id_allocator =
- group_->GetIdAllocator(id_namespaces::kTextures);
- id_allocator->MarkAsUsed(client_id);
-
texture_ref = texture_manager()->Consume(client_id, texture);
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 9ddadf8..e97b4c4 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"
@@ -209,123 +208,6 @@ TEST_P(GLES2DecoderWithShaderTest, GetMaxValueInBufferCHROMIUM) {
EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
}
-TEST_P(GLES2DecoderTest, SharedIds) {
- GenSharedIdsCHROMIUM gen_cmd;
- RegisterSharedIdsCHROMIUM reg_cmd;
- DeleteSharedIdsCHROMIUM del_cmd;
-
- const GLuint kNamespaceId = id_namespaces::kTextures;
- const GLuint kExpectedId1 = 1;
- const GLuint kExpectedId2 = 2;
- const GLuint kExpectedId3 = 4;
- const GLuint kRegisterId = 3;
- GLuint* ids = GetSharedMemoryAs<GLuint*>();
- gen_cmd.Init(kNamespaceId, 0, 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd));
- IdAllocatorInterface* id_allocator = GetIdAllocator(kNamespaceId);
- ASSERT_TRUE(id_allocator != NULL);
- // This check is implementation dependant but it's kind of hard to check
- // otherwise.
- EXPECT_EQ(kExpectedId1, ids[0]);
- EXPECT_EQ(kExpectedId2, ids[1]);
- EXPECT_TRUE(id_allocator->InUse(kExpectedId1));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId2));
- EXPECT_FALSE(id_allocator->InUse(kRegisterId));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId3));
-
- ClearSharedMemory();
- ids[0] = kRegisterId;
- reg_cmd.Init(kNamespaceId, 1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(reg_cmd));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId1));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId2));
- EXPECT_TRUE(id_allocator->InUse(kRegisterId));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId3));
-
- ClearSharedMemory();
- gen_cmd.Init(kNamespaceId, 0, 1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd));
- EXPECT_EQ(kExpectedId3, ids[0]);
- EXPECT_TRUE(id_allocator->InUse(kExpectedId1));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId2));
- EXPECT_TRUE(id_allocator->InUse(kRegisterId));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId3));
-
- ClearSharedMemory();
- ids[0] = kExpectedId1;
- ids[1] = kRegisterId;
- del_cmd.Init(kNamespaceId, 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(del_cmd));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId1));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId2));
- EXPECT_FALSE(id_allocator->InUse(kRegisterId));
- EXPECT_TRUE(id_allocator->InUse(kExpectedId3));
-
- ClearSharedMemory();
- ids[0] = kExpectedId3;
- ids[1] = kExpectedId2;
- del_cmd.Init(kNamespaceId, 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(del_cmd));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId1));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId2));
- EXPECT_FALSE(id_allocator->InUse(kRegisterId));
- EXPECT_FALSE(id_allocator->InUse(kExpectedId3));
-
- // Check passing in an id_offset.
- ClearSharedMemory();
- const GLuint kOffset = 0xABCDEF;
- gen_cmd.Init(kNamespaceId, kOffset, 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd));
- EXPECT_EQ(kOffset, ids[0]);
- EXPECT_EQ(kOffset + 1, ids[1]);
-}
-
-TEST_P(GLES2DecoderTest, GenSharedIdsCHROMIUMBadArgs) {
- const GLuint kNamespaceId = id_namespaces::kTextures;
- GenSharedIdsCHROMIUM cmd;
- cmd.Init(kNamespaceId, 0, -1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 0, 1, kInvalidSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 0, 1, kSharedMemoryId, kInvalidSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
-}
-
-TEST_P(GLES2DecoderTest, RegisterSharedIdsCHROMIUMBadArgs) {
- const GLuint kNamespaceId = id_namespaces::kTextures;
- RegisterSharedIdsCHROMIUM cmd;
- cmd.Init(kNamespaceId, -1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 1, kInvalidSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 1, kSharedMemoryId, kInvalidSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
-}
-
-TEST_P(GLES2DecoderTest, RegisterSharedIdsCHROMIUMDuplicateIds) {
- const GLuint kNamespaceId = id_namespaces::kTextures;
- const GLuint kRegisterId = 3;
- RegisterSharedIdsCHROMIUM cmd;
- GLuint* ids = GetSharedMemoryAs<GLuint*>();
- ids[0] = kRegisterId;
- cmd.Init(kNamespaceId, 1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
-}
-
-TEST_P(GLES2DecoderTest, DeleteSharedIdsCHROMIUMBadArgs) {
- const GLuint kNamespaceId = id_namespaces::kTextures;
- DeleteSharedIdsCHROMIUM cmd;
- cmd.Init(kNamespaceId, -1, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 1, kInvalidSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(kNamespaceId, 1, kSharedMemoryId, kInvalidSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
-}
-
TEST_P(GLES2DecoderTest, IsBuffer) {
EXPECT_FALSE(DoIsBuffer(client_buffer_id_));
DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
index 26d6de4..95c2027 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -667,12 +667,6 @@ TEST_P(GLES2DecoderTest2, PopGroupMarkerEXTValidArgs) {
// TODO(gman): BindVertexArrayOES
// TODO(gman): SwapBuffers
// TODO(gman): GetMaxValueInBufferCHROMIUM
-// TODO(gman): GenSharedIdsCHROMIUM
-
-// TODO(gman): DeleteSharedIdsCHROMIUM
-
-// TODO(gman): RegisterSharedIdsCHROMIUM
-
// TODO(gman): EnableFeatureCHROMIUM
// TODO(gman): ResizeCHROMIUM
@@ -716,4 +710,8 @@ TEST_P(GLES2DecoderTest2, PopGroupMarkerEXTValidArgs) {
// TODO(gman): WaitSyncPointCHROMIUM
+// TODO(gman): DrawBuffersEXTImmediate
+// TODO(gman): DiscardBackbufferCHROMIUM
+
+// TODO(gman): ScheduleOverlayPlaneCHROMIUM
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
index adbde49..7e93f36 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h
@@ -12,8 +12,4 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
-// TODO(gman): DrawBuffersEXTImmediate
-// TODO(gman): DiscardBackbufferCHROMIUM
-
-// TODO(gman): ScheduleOverlayPlaneCHROMIUM
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_3_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
index 3b000fc..36b14e5 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index 7fdeab0..0730752 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -97,10 +97,6 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool> {
return reinterpret_cast<T>(ptr);
}
- IdAllocatorInterface* GetIdAllocator(GLuint namespace_id) {
- return group_->GetIdAllocator(namespace_id);
- }
-
Buffer* GetBuffer(GLuint service_id) {
return group_->buffer_manager()->GetBuffer(service_id);
}
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
index 49ebfc3..74149ef 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
index 3c5b72a..7c8e5ae 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
index eb8bf4c..32ba98d 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
index ce12382..05cb9ff 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -8,7 +8,6 @@
#include "base/strings/string_number_conversions.h"
#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
-#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager_mock.h"