summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 08:26:55 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 08:26:55 +0000
commit51fd18b10aa37d57d2c4a42581e98423629780d0 (patch)
treeaa886011ab60473e364a1676f16c8fc5b34ca830 /gpu/command_buffer/service
parent2fe6c79fdf2d51e309bfd4d6a3b21cdf5442dc69 (diff)
downloadchromium_src-51fd18b10aa37d57d2c4a42581e98423629780d0.zip
chromium_src-51fd18b10aa37d57d2c4a42581e98423629780d0.tar.gz
chromium_src-51fd18b10aa37d57d2c4a42581e98423629780d0.tar.bz2
Reverting commit 44334
TEST=none BUG=none TBR=dumi@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service')
-rw-r--r--gpu/command_buffer/service/gl_interface.h3
-rw-r--r--gpu/command_buffer/service/gl_mock.h3
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder.cc18
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_autogen.h28
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc55
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h2
-rw-r--r--gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h3
7 files changed, 2 insertions, 110 deletions
diff --git a/gpu/command_buffer/service/gl_interface.h b/gpu/command_buffer/service/gl_interface.h
index fd934bf..0629e20 100644
--- a/gpu/command_buffer/service/gl_interface.h
+++ b/gpu/command_buffer/service/gl_interface.h
@@ -400,9 +400,6 @@ class GLInterface {
virtual void SwapBuffers() = 0;
- virtual GLuint GetMaxValueInBuffer(
- GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) = 0;
-
private:
static GLInterface* interface_;
};
diff --git a/gpu/command_buffer/service/gl_mock.h b/gpu/command_buffer/service/gl_mock.h
index 41be895..ca038bb 100644
--- a/gpu/command_buffer/service/gl_mock.h
+++ b/gpu/command_buffer/service/gl_mock.h
@@ -376,9 +376,6 @@ class MockGLInterface : public GLInterface {
MOCK_METHOD4(Viewport, void(GLint x, GLint y, GLsizei width, GLsizei height));
MOCK_METHOD0(SwapBuffers, void());
-
- MOCK_METHOD4(GetMaxValueInBuffer, GLuint(
- GLuint buffer_id, GLsizei count, GLenum type, GLuint offset));
};
} // namespace gles2
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 3d8b0af..706407a 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -679,10 +679,6 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
// Wrapper for DoGetIntegerv.
void DoGetIntegerv(GLenum pname, GLint* params);
- // Gets the max value in a range in a buffer.
- GLuint DoGetMaxValueInBuffer(
- GLuint buffer_id, GLsizei count, GLenum type, GLuint offset);
-
// Wrapper for glRenderbufferParameteriv.
void DoGetRenderbufferParameteriv(
GLenum target, GLenum pname, GLint* params);
@@ -2358,20 +2354,6 @@ error::Error GLES2DecoderImpl::HandleDrawElements(
return error::kNoError;
}
-GLuint GLES2DecoderImpl::DoGetMaxValueInBuffer(
- GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) {
- GLuint max_vertex_accessed = 0;
- BufferManager::BufferInfo* info = GetBufferInfo(buffer_id);
- if (info->target() != GL_ELEMENT_ARRAY_BUFFER) {
- SetGLError(GL_INVALID_OPERATION);
- } else {
- if (!info->GetMaxValueForRange(offset, count, type, &max_vertex_accessed)) {
- SetGLError(GL_INVALID_OPERATION);
- }
- }
- return max_vertex_accessed;
-}
-
// Calls glShaderSource for the various versions of the ShaderSource command.
// Assumes that data / data_size points to a piece of memory that is in range
// of whatever context it came from (shared memory, immediate memory, bucket
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 0bda376..01e9dd2 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -2828,33 +2828,5 @@ error::Error GLES2DecoderImpl::HandleViewport(
return error::kNoError;
}
-error::Error GLES2DecoderImpl::HandleGetMaxValueInBuffer(
- uint32 immediate_data_size, const gles2::GetMaxValueInBuffer& c) {
- GLuint buffer_id;
- if (!id_manager()->GetServiceId(c.buffer_id, &buffer_id)) {
- SetGLError(GL_INVALID_VALUE);
- return error::kNoError;
- }
- GLsizei count = static_cast<GLsizei>(c.count);
- GLenum type = static_cast<GLenum>(c.type);
- GLuint offset = static_cast<GLuint>(c.offset);
- typedef GetMaxValueInBuffer::Result Result;
- Result* result_dst = GetSharedMemoryAs<Result*>(
- c.result_shm_id, c.result_shm_offset, sizeof(*result_dst));
- if (!result_dst) {
- return error::kOutOfBounds;
- }
- if (count < 0) {
- SetGLError(GL_INVALID_VALUE);
- return error::kNoError;
- }
- if (!ValidateGLenumIndexType(type)) {
- SetGLError(GL_INVALID_ENUM);
- return error::kNoError;
- }
- *result_dst = DoGetMaxValueInBuffer(buffer_id, count, type, offset);
- return error::kNoError;
-}
-
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index 1f64b79..b916f8e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -1885,61 +1885,6 @@ TEST_F(GLES2DecoderWithShaderTest, GetUniformLocationBucketInvalidArgs) {
EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
}
-TEST_F(GLES2DecoderWithShaderTest, GetMaxValueInBuffer) {
- SetupIndexBuffer();
- GetMaxValueInBuffer::Result* result =
- static_cast<GetMaxValueInBuffer::Result*>(shared_memory_address_);
- *result = 0;
-
- GetMaxValueInBuffer cmd;
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount, GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(7u, *result);
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(100u, *result);
- EXPECT_EQ(GL_NO_ERROR, GetGLError());
-
- cmd.Init(kInvalidClientId, kValidIndexRangeCount,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
- cmd.Init(client_element_buffer_id_, kOutOfRangeIndexRangeEnd,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kOutOfRangeIndexRangeEnd * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(client_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2, kSharedMemoryId, kSharedMemoryOffset);
- EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
- EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2,
- kInvalidSharedMemoryId, kSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
- cmd.Init(client_element_buffer_id_, kValidIndexRangeCount + 1,
- GL_UNSIGNED_SHORT,
- kValidIndexRangeStart * 2,
- kSharedMemoryId, kInvalidSharedMemoryOffset);
- EXPECT_NE(error::kNoError, ExecuteCmd(cmd));
-}
-
// TODO(gman): BufferData
// TODO(gman): BufferDataImmediate
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
index c91acde..203ec06 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
@@ -1851,7 +1851,5 @@ TEST_F(GLES2DecoderTest1, GetTexParameterivInvalidArgs2_1) {
}
// TODO(gman): GetUniformfv
-// TODO(gman): GetUniformiv
-
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_1_AUTOGEN_H_
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 64f1424..bdf34cf 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
@@ -8,6 +8,8 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_
+// TODO(gman): GetUniformiv
+
// TODO(gman): GetUniformLocation
// TODO(gman): GetUniformLocationImmediate
@@ -1633,6 +1635,5 @@ TEST_F(GLES2DecoderTest2, ViewportInvalidArgs3_0) {
EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
}
// TODO(gman): SwapBuffers
-// TODO(gman): GetMaxValueInBuffer
#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_2_AUTOGEN_H_