| Index: cc/resources/resource_provider.cc | 
| diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc | 
| index f851fd3dc0d0e3891647eb89f6bee3595784322b..18cabee1cab1040434ad98fbe9ebc9d3a0e259cf 100644 | 
| --- a/cc/resources/resource_provider.cc | 
| +++ b/cc/resources/resource_provider.cc | 
| @@ -411,6 +411,7 @@ | 
| use_texture_format_bgra_(false), | 
| use_texture_usage_hint_(false), | 
| use_compressed_texture_etc1_(false), | 
| +      yuv_resource_format_(LUMINANCE_8), | 
| max_texture_size_(0), | 
| best_texture_format_(RGBA_8888), | 
| best_render_buffer_format_(RGBA_8888), | 
| @@ -448,6 +449,15 @@ | 
| use_texture_format_bgra_ = caps.texture_format_bgra8888; | 
| use_texture_usage_hint_ = caps.texture_usage; | 
| use_compressed_texture_etc1_ = caps.texture_format_etc1; | 
| + | 
| +  if (caps.disable_one_component_textures) { | 
| +    yuv_resource_format_ = yuv_highbit_resource_format_ = RGBA_8888; | 
| +  } else { | 
| +    yuv_resource_format_ = caps.texture_rg ? RED_8 : LUMINANCE_8; | 
| +    yuv_highbit_resource_format_ = | 
| +        caps.texture_half_float_linear ? LUMINANCE_F16 : yuv_resource_format_; | 
| +  } | 
| + | 
| use_sync_query_ = caps.sync_query; | 
|  | 
| GLES2Interface* gl = ContextGL(); | 
| @@ -537,6 +547,14 @@ | 
| Resource* resource = GetResource(id); | 
| DCHECK(resource); | 
| resource->lost = true; | 
| +} | 
| + | 
| +ResourceFormat ResourceProvider::YuvResourceFormat(int bits) const { | 
| +  if (bits > 8) { | 
| +    return yuv_highbit_resource_format_; | 
| +  } else { | 
| +    return yuv_resource_format_; | 
| +  } | 
| } | 
|  | 
| ResourceId ResourceProvider::CreateResource( | 
|  |