| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index e8bbe5885459434f3dff96c195f981ae1b6ee30d..409ad4af595b5734cc1f20be4e992f5113688cdb 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -174,6 +174,20 @@ gfx::OverlayTransform GetGFXOverlayTransform(GLenum plane_transform) {
|
| }
|
| }
|
|
|
| +gfx::BufferFormat GetGFXOverlayStorageFormat(GLuint storage_format) {
|
| + switch (storage_format) {
|
| + case GL_BGR:
|
| + return gfx::BufferFormat::BGRX_8888;
|
| + case GL_BGRA_EXT:
|
| + return gfx::BufferFormat::BGRA_8888;
|
| + case GL_RGB_YCBCR_422_CHROMIUM:
|
| + return gfx::BufferFormat::UYVY_422;
|
| + default:
|
| + NOTREACHED();
|
| + return gfx::BufferFormat::BGRX_8888;
|
| + }
|
| +}
|
| +
|
| template <typename MANAGER_TYPE, typename OBJECT_TYPE>
|
| GLuint GetClientId(const MANAGER_TYPE* manager, const OBJECT_TYPE* object) {
|
| DCHECK(manager);
|
| @@ -9584,9 +9598,11 @@ error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM(
|
| if (!surface_->ScheduleOverlayPlane(
|
| c.plane_z_order,
|
| transform,
|
| + GetGFXOverlayStorageFormat(c.storage_format),
|
| image,
|
| gfx::Rect(c.bounds_x, c.bounds_y, c.bounds_width, c.bounds_height),
|
| - gfx::RectF(c.uv_x, c.uv_y, c.uv_width, c.uv_height))) {
|
| + gfx::RectF(c.uv_x, c.uv_y, c.uv_width, c.uv_height),
|
| + static_cast<GLboolean>(c.handle_scaling))) {
|
| LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION,
|
| "glScheduleOverlayPlaneCHROMIUM",
|
| "failed to schedule overlay");
|
|
|