| Index: cc/resources/resource_provider.cc
|
| diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
|
| index c2e850bc2493872d771842c1db5f628a9ae78d88..8beccf7f250fc9fc419fcd724549afe0feedc36e 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;
|
| @@ -446,6 +448,10 @@ 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
|
| + : RGBA_8888;
|
| yuv_highbit_resource_format_ = yuv_resource_format_;
|
| if (caps.texture_half_float_linear)
|
| yuv_highbit_resource_format_ = LUMINANCE_F16;
|
| @@ -514,6 +520,7 @@ bool ResourceProvider::IsResourceFormatSupported(ResourceFormat format) const {
|
| case ETC1:
|
| return caps.texture_format_etc1;
|
| case RED_8:
|
| + case RG_88:
|
| return caps.texture_rg;
|
| case LUMINANCE_F16:
|
| return caps.texture_half_float_linear;
|
| @@ -577,6 +584,10 @@ ResourceId ResourceProvider::CreateResource(
|
| return 0;
|
| }
|
|
|
| +ResourceFormat ResourceProvider::Y16ResourceFormat() const {
|
| + return y16_resource_format_;
|
| +}
|
| +
|
| ResourceId ResourceProvider::CreateGpuMemoryBufferResource(
|
| const gfx::Size& size,
|
| TextureHint hint,
|
| @@ -1040,6 +1051,7 @@ ResourceProvider::ScopedReadLockGL::ScopedReadLockGL(
|
| const Resource* resource = resource_provider->LockForRead(resource_id);
|
| texture_id_ = resource->gl_id;
|
| target_ = resource->target;
|
| + format_ = resource->format;
|
| size_ = resource->size;
|
| color_space_ = resource->color_space;
|
| }
|
|
|