| Index: gpu/command_buffer/common/gles2_cmd_utils.cc | 
| diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc | 
| index f2513a9267a5152bbb62c86c2cf470cabf9c7698..e0b55793e949c17e27977a32761c5f3768c3e93d 100644 | 
| --- a/gpu/command_buffer/common/gles2_cmd_utils.cc | 
| +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc | 
| @@ -445,6 +445,23 @@ bool GLES2Util::ComputeImageDataSizes( | 
| return true; | 
| } | 
|  | 
| +bool GLES2Util::ComputeEstimatedRenderbufferSize( | 
| +    int width, int height, int samples, int internal_format, uint32* size) { | 
| +  uint32 temp = 0; | 
| +  if (!SafeMultiplyUint32(width, height, &temp)) { | 
| +    return false; | 
| +  } | 
| +  if (!SafeMultiplyUint32(temp, samples, &temp)) { | 
| +    return false; | 
| +  } | 
| +  if (!SafeMultiplyUint32( | 
| +      temp, GLES2Util::RenderbufferBytesPerPixel(internal_format), &temp)) { | 
| +    return false; | 
| +  } | 
| +  *size = temp; | 
| +  return true; | 
| +} | 
| + | 
| size_t GLES2Util::RenderbufferBytesPerPixel(int format) { | 
| switch (format) { | 
| case GL_STENCIL_INDEX8: | 
|  |