| Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
|
| index 418388c9404ff38aa00e595d7d7ec92b21817e01..05b23631cca6a2b87246cbb36798fb885a790dc9 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
|
| @@ -2594,7 +2594,21 @@ error::Error GLES2DecoderPassthroughImpl::DoGetUniformsES3CHROMIUM(
|
| error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE(
|
| GLuint shader,
|
| std::string* source) {
|
| - NOTIMPLEMENTED();
|
| + FlushErrors();
|
| + GLuint service_id = GetShaderServiceID(shader, resources_);
|
| + GLint translated_source_length = 0;
|
| + glGetShaderiv(service_id, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE,
|
| + &translated_source_length);
|
| + if (FlushErrors()) {
|
| + return error::kNoError;
|
| + }
|
| +
|
| + if (translated_source_length > 0) {
|
| + std::vector<char> buffer(translated_source_length, 0);
|
| + glGetTranslatedShaderSourceANGLE(service_id, translated_source_length,
|
| + nullptr, buffer.data());
|
| + *source = std::string(buffer.data());
|
| + }
|
| return error::kNoError;
|
| }
|
|
|
|
|