Index: cc/resources/resource_provider.cc |
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc |
index 636e797900b85e7386efbd3e558e87f6fe09869a..fe7cc003ddf1c76bc5dc56849122e2e27e07bcdb 100644 |
--- a/cc/resources/resource_provider.cc |
+++ b/cc/resources/resource_provider.cc |
@@ -76,6 +76,7 @@ GLenum TextureToStorageFormat(ResourceFormat format) { |
case LUMINANCE_8: |
case RGB_565: |
case ETC1: |
+ case RED_8: |
NOTREACHED(); |
break; |
} |
@@ -94,6 +95,7 @@ bool IsFormatSupportedForStorage(ResourceFormat format, bool use_bgra) { |
case LUMINANCE_8: |
case RGB_565: |
case ETC1: |
+ case RED_8: |
return false; |
} |
return false; |
@@ -125,6 +127,7 @@ gfx::GpuMemoryBuffer::Format ToGpuMemoryBufferFormat(ResourceFormat format) { |
case LUMINANCE_8: |
case RGB_565: |
case ETC1: |
+ case RED_8: |
break; |
} |
NOTREACHED(); |
@@ -1216,6 +1219,7 @@ ResourceProvider::ResourceProvider( |
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), |
use_rgba_4444_texture_format_(use_rgba_4444_texture_format), |
@@ -1254,6 +1258,7 @@ void ResourceProvider::InitializeGL() { |
use_texture_format_bgra_ = caps.gpu.texture_format_bgra8888; |
use_texture_usage_hint_ = caps.gpu.texture_usage; |
use_compressed_texture_etc1_ = caps.gpu.texture_format_etc1; |
+ yuv_resource_format_ = caps.gpu.texture_rg ? RED_8 : LUMINANCE_8; |
use_sync_query_ = caps.gpu.sync_query; |
GLES2Interface* gl = ContextGL(); |