| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index 0da78bcf19e1b95aa67024383ddda891e37e9eb4..958882357c95e3da3a836f52d202451a6aff6137 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -1941,10 +1941,20 @@ void GLES2Implementation::GetShaderPrecisionFormat(
|
| if (!result) {
|
| return;
|
| }
|
| - result->success = false;
|
| - helper_->GetShaderPrecisionFormat(
|
| - shadertype, precisiontype, GetResultShmId(), GetResultShmOffset());
|
| - WaitForCmd();
|
| +
|
| + ShaderPrecisionCacheKey key(shadertype, precisiontype);
|
| + ShaderPrecisionCacheMap::iterator i = shader_precision_cache_.find(key);
|
| + if (i != shader_precision_cache_.end()) {
|
| + *result = i->second;
|
| + } else {
|
| + result->success = false;
|
| + helper_->GetShaderPrecisionFormat(
|
| + shadertype, precisiontype, GetResultShmId(), GetResultShmOffset());
|
| + WaitForCmd();
|
| + if (result->success)
|
| + shader_precision_cache_[key] = *result;
|
| + }
|
| +
|
| if (result->success) {
|
| if (range) {
|
| range[0] = result->min_range;
|
|
|