| Index: cc/resources/resource_provider.cc
|
| diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
|
| index 406aa73b3331aaec3e9a9c8fe16258cb53254c3e..6c94a5fedea0135d2ea962941952ce2764410d6c 100644
|
| --- a/cc/resources/resource_provider.cc
|
| +++ b/cc/resources/resource_provider.cc
|
| @@ -91,6 +91,7 @@ GLenum TextureToStorageFormat(ResourceFormat format) {
|
| case ETC1:
|
| case RED_8:
|
| case LUMINANCE_F16:
|
| + case RG_88:
|
| NOTREACHED();
|
| break;
|
| }
|
| @@ -111,6 +112,7 @@ bool IsFormatSupportedForStorage(ResourceFormat format, bool use_bgra) {
|
| case ETC1:
|
| case RED_8:
|
| case LUMINANCE_F16:
|
| + case RG_88:
|
| return false;
|
| }
|
| return false;
|
| @@ -447,6 +449,7 @@ ResourceProvider::ResourceProvider(
|
| use_texture_usage_hint_ = caps.texture_usage;
|
| use_compressed_texture_etc1_ = caps.texture_format_etc1;
|
| yuv_resource_format_ = caps.texture_rg ? RED_8 : LUMINANCE_8;
|
| + y16_resource_format_ = caps.texture_rg ? RG_88 : LUMINANCE_8;
|
| yuv_highbit_resource_format_ = yuv_resource_format_;
|
| if (caps.texture_half_float_linear)
|
| yuv_highbit_resource_format_ = LUMINANCE_F16;
|
| @@ -549,6 +552,14 @@ ResourceFormat ResourceProvider::YuvResourceFormat(int bits) const {
|
| }
|
| }
|
|
|
| +ResourceFormat ResourceProvider::Y16ResourceFormat(int bits) const {
|
| + if (bits > 8) {
|
| + return y16_resource_format_;
|
| + } else {
|
| + return yuv_resource_format_;
|
| + }
|
| +}
|
| +
|
| ResourceId ResourceProvider::CreateResource(const gfx::Size& size,
|
| TextureHint hint,
|
| ResourceFormat format) {
|
|
|