| Index: cc/resources/video_resource_updater.cc
|
| diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
|
| index f278c590630ca8ed12258820edce1c0830d03d00..8f042e182ae980c4f10f1f2f6da3d3a6642c9606 100644
|
| --- a/cc/resources/video_resource_updater.cc
|
| +++ b/cc/resources/video_resource_updater.cc
|
| @@ -15,11 +15,13 @@
|
| #include "third_party/khronos/GLES2/gl2ext.h"
|
| #include "ui/gfx/size_conversions.h"
|
|
|
| -const unsigned kYUVResourceFormat = GL_LUMINANCE;
|
| -const unsigned kRGBResourceFormat = GL_RGBA;
|
| -
|
| namespace cc {
|
|
|
| +const ResourceProvider::Format kYUVResourceFormat =
|
| + ResourceProvider::LUMINANCE_8;
|
| +const ResourceProvider::Format kRGBResourceFormat =
|
| + ResourceProvider::RGBA_8888;
|
| +
|
| VideoFrameExternalResources::VideoFrameExternalResources() : type(NONE) {}
|
|
|
| VideoFrameExternalResources::~VideoFrameExternalResources() {}
|
| @@ -90,7 +92,7 @@ bool VideoResourceUpdater::VerifyFrame(
|
| static gfx::Size SoftwarePlaneDimension(
|
| media::VideoFrame::Format input_frame_format,
|
| gfx::Size coded_size,
|
| - GLenum output_resource_format,
|
| + ResourceProvider::Format output_resource_format,
|
| int plane_index) {
|
| if (output_resource_format == kYUVResourceFormat) {
|
| if (plane_index == media::VideoFrame::kYPlane ||
|
| @@ -116,7 +118,7 @@ static gfx::Size SoftwarePlaneDimension(
|
| }
|
| }
|
|
|
| - DCHECK_EQ(output_resource_format, static_cast<unsigned>(kRGBResourceFormat));
|
| + DCHECK_EQ(output_resource_format, kRGBResourceFormat);
|
| return coded_size;
|
| }
|
|
|
| @@ -143,7 +145,7 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
|
|
|
| bool software_compositor = context_provider_ == NULL;
|
|
|
| - GLenum output_resource_format = kYUVResourceFormat;
|
| + ResourceProvider::Format output_resource_format = kYUVResourceFormat;
|
| size_t output_plane_count =
|
| (input_frame_format == media::VideoFrame::YV12A) ? 4 : 3;
|
|
|
| @@ -194,9 +196,9 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
|
| // ResourceProvider and stop using ResourceProvider in this class.
|
| resource_id =
|
| resource_provider_->CreateResource(output_plane_resource_size,
|
| - output_resource_format,
|
| GL_CLAMP_TO_EDGE,
|
| - ResourceProvider::TextureUsageAny);
|
| + ResourceProvider::TextureUsageAny,
|
| + output_resource_format);
|
|
|
| DCHECK(mailbox.IsZero());
|
|
|
|
|