| Index: ui/gl/gl_surface_ozone.cc
|
| diff --git a/ui/gl/gl_surface_ozone.cc b/ui/gl/gl_surface_ozone.cc
|
| index b2dc8df466f5bf830247d2a2606ea883d19be6ff..2b749932f20ce9bc64796cf4faea632c0ae0de1a 100644
|
| --- a/ui/gl/gl_surface_ozone.cc
|
| +++ b/ui/gl/gl_surface_ozone.cc
|
| @@ -51,9 +51,11 @@ class GL_EXPORT GLSurfaceOzoneEGL : public NativeViewGLSurfaceEGL {
|
| gfx::SwapResult SwapBuffers() override;
|
| bool ScheduleOverlayPlane(int z_order,
|
| OverlayTransform transform,
|
| + gfx::BufferFormat storage_format,
|
| GLImage* image,
|
| const Rect& bounds_rect,
|
| - const RectF& crop_rect) override;
|
| + const RectF& crop_rect,
|
| + bool handle_scaling) override;
|
|
|
| private:
|
| using NativeViewGLSurfaceEGL::Initialize;
|
| @@ -101,11 +103,14 @@ gfx::SwapResult GLSurfaceOzoneEGL::SwapBuffers() {
|
|
|
| bool GLSurfaceOzoneEGL::ScheduleOverlayPlane(int z_order,
|
| OverlayTransform transform,
|
| + gfx::BufferFormat storage_format,
|
| GLImage* image,
|
| const Rect& bounds_rect,
|
| - const RectF& crop_rect) {
|
| - return image->ScheduleOverlayPlane(widget_, z_order, transform, bounds_rect,
|
| - crop_rect);
|
| + const RectF& crop_rect,
|
| + bool handle_scaling) {
|
| + return image->ScheduleOverlayPlane(widget_, z_order, transform,
|
| + storage_format, bounds_rect,
|
| + crop_rect, handle_scaling);
|
| }
|
|
|
| GLSurfaceOzoneEGL::~GLSurfaceOzoneEGL() {
|
| @@ -149,9 +154,11 @@ class GL_EXPORT GLSurfaceOzoneSurfaceless : public SurfacelessEGL {
|
| gfx::SwapResult SwapBuffers() override;
|
| bool ScheduleOverlayPlane(int z_order,
|
| OverlayTransform transform,
|
| + gfx::BufferFormat storage_format,
|
| GLImage* image,
|
| const Rect& bounds_rect,
|
| - const RectF& crop_rect) override;
|
| + const RectF& crop_rect,
|
| + bool handle_scaling) override;
|
| bool IsOffscreen() override;
|
| VSyncProvider* GetVSyncProvider() override;
|
| bool SupportsAsyncSwap() override;
|
| @@ -263,13 +270,14 @@ gfx::SwapResult GLSurfaceOzoneSurfaceless::SwapBuffers() {
|
| : gfx::SwapResult::SWAP_FAILED;
|
| }
|
|
|
| -bool GLSurfaceOzoneSurfaceless::ScheduleOverlayPlane(int z_order,
|
| - OverlayTransform transform,
|
| - GLImage* image,
|
| - const Rect& bounds_rect,
|
| - const RectF& crop_rect) {
|
| +bool GLSurfaceOzoneSurfaceless::ScheduleOverlayPlane(
|
| + int z_order, OverlayTransform transform,
|
| + gfx::BufferFormat storage_format, GLImage* image,
|
| + const Rect& bounds_rect, const RectF& crop_rect,
|
| + bool handle_scaling) {
|
| unsubmitted_frames_.back()->overlays.push_back(
|
| - GLSurfaceOverlay(z_order, transform, image, bounds_rect, crop_rect));
|
| + GLSurfaceOverlay(z_order, transform, storage_format, image, bounds_rect,
|
| + crop_rect, handle_scaling));
|
| return true;
|
| }
|
|
|
| @@ -484,8 +492,10 @@ bool GLSurfaceOzoneSurfacelessSurfaceImpl::SupportsPostSubBuffer() {
|
| gfx::SwapResult GLSurfaceOzoneSurfacelessSurfaceImpl::SwapBuffers() {
|
| if (!images_[current_surface_]->ScheduleOverlayPlane(
|
| widget_, 0, OverlayTransform::OVERLAY_TRANSFORM_NONE,
|
| - gfx::Rect(GetSize()), gfx::RectF(1, 1)))
|
| + gfx::BufferFormat::BGRX_8888, gfx::Rect(GetSize()),
|
| + gfx::RectF(1, 1), true)) {
|
| return gfx::SwapResult::SWAP_FAILED;
|
| + }
|
| gfx::SwapResult result = GLSurfaceOzoneSurfaceless::SwapBuffers();
|
| if (result != gfx::SwapResult::SWAP_ACK)
|
| return result;
|
| @@ -498,7 +508,8 @@ void GLSurfaceOzoneSurfacelessSurfaceImpl::SwapBuffersAsync(
|
| const SwapCompletionCallback& callback) {
|
| if (!images_[current_surface_]->ScheduleOverlayPlane(
|
| widget_, 0, OverlayTransform::OVERLAY_TRANSFORM_NONE,
|
| - gfx::Rect(GetSize()), gfx::RectF(1, 1))) {
|
| + gfx::BufferFormat::BGRX_8888, gfx::Rect(GetSize()),
|
| + gfx::RectF(1, 1), true)) {
|
| callback.Run(gfx::SwapResult::SWAP_FAILED);
|
| return;
|
| }
|
|
|