Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 282253002: Remove unneeded shm versions of bucket functions from command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-shm-for-immediate-commands
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 12bbd7cee2b9163dc574aee140cd1b821deb3039..057a2809fff3794d348dd6c2a150c99200b8fb88 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4705,21 +4705,6 @@ void GLES2DecoderImpl::DoBindAttribLocation(
glBindAttribLocation(program->service_id(), index, name);
}
-error::Error GLES2DecoderImpl::HandleBindAttribLocation(
- uint32 immediate_data_size, const cmds::BindAttribLocation& c) {
- GLuint program = static_cast<GLuint>(c.program);
- GLuint index = static_cast<GLuint>(c.index);
- uint32 name_size = c.data_size;
- const char* name = GetSharedMemoryAs<const char*>(
- c.name_shm_id, c.name_shm_offset, name_size);
- if (name == NULL) {
- return error::kOutOfBounds;
- }
- std::string name_str(name, name_size);
- DoBindAttribLocation(program, index, name_str.c_str());
- return error::kNoError;
-}
-
error::Error GLES2DecoderImpl::HandleBindAttribLocationBucket(
uint32 immediate_data_size, const cmds::BindAttribLocationBucket& c) {
GLuint program = static_cast<GLuint>(c.program);
@@ -4770,21 +4755,6 @@ void GLES2DecoderImpl::DoBindUniformLocationCHROMIUM(
}
}
-error::Error GLES2DecoderImpl::HandleBindUniformLocationCHROMIUM(
- uint32 immediate_data_size, const cmds::BindUniformLocationCHROMIUM& c) {
- GLuint program = static_cast<GLuint>(c.program);
- GLint location = static_cast<GLint>(c.location);
- uint32 name_size = c.data_size;
- const char* name = GetSharedMemoryAs<const char*>(
- c.name_shm_id, c.name_shm_offset, name_size);
- if (name == NULL) {
- return error::kOutOfBounds;
- }
- std::string name_str(name, name_size);
- DoBindUniformLocationCHROMIUM(program, location, name_str.c_str());
- return error::kNoError;
-}
-
error::Error GLES2DecoderImpl::HandleBindUniformLocationCHROMIUMBucket(
uint32 immediate_data_size,
const cmds::BindUniformLocationCHROMIUMBucket& c) {
@@ -6663,17 +6633,6 @@ error::Error GLES2DecoderImpl::ShaderSourceHelper(
return error::kNoError;
}
-error::Error GLES2DecoderImpl::HandleShaderSource(
- uint32 immediate_data_size, const cmds::ShaderSource& c) {
- uint32 data_size = c.data_size;
- const char* data = GetSharedMemoryAs<const char*>(
- c.data_shm_id, c.data_shm_offset, data_size);
- if (!data) {
- return error::kOutOfBounds;
- }
- return ShaderSourceHelper(c.shader, data, data_size);
-}
-
error::Error GLES2DecoderImpl::HandleShaderSourceBucket(
uint32 immediate_data_size, const cmds::ShaderSourceBucket& c) {
Bucket* bucket = GetBucket(c.data_bucket_id);
@@ -7599,19 +7558,6 @@ error::Error GLES2DecoderImpl::GetAttribLocationHelper(
error::Error GLES2DecoderImpl::HandleGetAttribLocation(
uint32 immediate_data_size, const cmds::GetAttribLocation& c) {
- uint32 name_size = c.data_size;
- const char* name = GetSharedMemoryAs<const char*>(
- c.name_shm_id, c.name_shm_offset, name_size);
- if (!name) {
- return error::kOutOfBounds;
- }
- std::string name_str(name, name_size);
- return GetAttribLocationHelper(
- c.program, c.location_shm_id, c.location_shm_offset, name_str);
-}
-
-error::Error GLES2DecoderImpl::HandleGetAttribLocationBucket(
- uint32 immediate_data_size, const cmds::GetAttribLocationBucket& c) {
Bucket* bucket = GetBucket(c.name_bucket_id);
if (!bucket) {
return error::kInvalidArguments;
@@ -7658,19 +7604,6 @@ error::Error GLES2DecoderImpl::GetUniformLocationHelper(
error::Error GLES2DecoderImpl::HandleGetUniformLocation(
uint32 immediate_data_size, const cmds::GetUniformLocation& c) {
- uint32 name_size = c.data_size;
- const char* name = GetSharedMemoryAs<const char*>(
- c.name_shm_id, c.name_shm_offset, name_size);
- if (!name) {
- return error::kOutOfBounds;
- }
- std::string name_str(name, name_size);
- return GetUniformLocationHelper(
- c.program, c.location_shm_id, c.location_shm_offset, name_str);
-}
-
-error::Error GLES2DecoderImpl::HandleGetUniformLocationBucket(
- uint32 immediate_data_size, const cmds::GetUniformLocationBucket& c) {
Bucket* bucket = GetBucket(c.name_bucket_id);
if (!bucket) {
return error::kInvalidArguments;

Powered by Google App Engine
This is Rietveld 408576698