| Index: gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
| diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
| index af6c63211e11f95b6d89296d6d408d411eb2a6ef..84d77e1f3a89a680a1257c3ebbcbb945cabf269f 100644
|
| --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
| +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
| @@ -22,6 +22,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| +#include "base/mac/scoped_cftyperef.h"
|
| #include "base/trace_event/trace_event.h"
|
| #include "gpu/ipc/common/gpu_messages.h"
|
| #include "gpu/ipc/service/gpu_channel_manager.h"
|
| @@ -33,7 +34,6 @@
|
| #include "ui/gfx/geometry/rect_conversions.h"
|
| #include "ui/gfx/swap_result.h"
|
| #include "ui/gfx/transform.h"
|
| -#include "ui/gl/ca_renderer_layer_params.h"
|
| #include "ui/gl/gl_context.h"
|
| #include "ui/gl/gl_fence.h"
|
| #include "ui/gl/gl_image_io_surface.h"
|
| @@ -331,15 +331,35 @@
|
| }
|
|
|
| bool ImageTransportSurfaceOverlayMac::ScheduleCALayer(
|
| - const ui::CARendererLayerParams& params) {
|
| - gl::GLImageIOSurface* io_surface_image =
|
| - gl::GLImageIOSurface::FromGLImage(params.image);
|
| - if (!io_surface_image) {
|
| - DLOG(ERROR) << "Cannot schedule CALayer with non-IOSurface GLImage";
|
| - return false;
|
| + gl::GLImage* contents_image,
|
| + const gfx::RectF& contents_rect,
|
| + float opacity,
|
| + unsigned background_color,
|
| + unsigned edge_aa_mask,
|
| + const gfx::RectF& rect,
|
| + bool is_clipped,
|
| + const gfx::RectF& clip_rect,
|
| + const gfx::Transform& transform,
|
| + int sorting_context_id,
|
| + unsigned filter) {
|
| + base::ScopedCFTypeRef<IOSurfaceRef> io_surface;
|
| + base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer;
|
| + if (contents_image) {
|
| + gl::GLImageIOSurface* io_surface_image =
|
| + gl::GLImageIOSurface::FromGLImage(contents_image);
|
| + if (!io_surface_image) {
|
| + DLOG(ERROR) << "Cannot schedule CALayer with non-IOSurface GLImage";
|
| + return false;
|
| + }
|
| + io_surface = io_surface_image->io_surface();
|
| + cv_pixel_buffer = io_surface_image->cv_pixel_buffer();
|
| }
|
| return ca_layer_tree_coordinator_->GetPendingCARendererLayerTree()
|
| - ->ScheduleCALayer(params);
|
| + ->ScheduleCALayer(is_clipped, gfx::ToEnclosingRect(clip_rect),
|
| + sorting_context_id, transform, io_surface,
|
| + cv_pixel_buffer, contents_rect,
|
| + gfx::ToEnclosingRect(rect), background_color,
|
| + edge_aa_mask, opacity, filter);
|
| }
|
|
|
| void ImageTransportSurfaceOverlayMac::ScheduleCALayerInUseQuery(
|
|
|