Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: gpu/ipc/service/image_transport_surface_overlay_mac.mm

Issue 2006923006: Move all CARendererLayerTree parameters to separate struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 84d77e1f3a89a680a1257c3ebbcbb945cabf269f..af6c63211e11f95b6d89296d6d408d411eb2a6ef 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -22,7 +22,6 @@ typedef void* GLeglImageOES;
#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"
@@ -34,6 +33,7 @@ typedef void* GLeglImageOES;
#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,35 +331,15 @@ bool ImageTransportSurfaceOverlayMac::ScheduleOverlayPlane(
}
bool ImageTransportSurfaceOverlayMac::ScheduleCALayer(
- 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();
+ 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;
}
return ca_layer_tree_coordinator_->GetPendingCARendererLayerTree()
- ->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);
+ ->ScheduleCALayer(params);
}
void ImageTransportSurfaceOverlayMac::ScheduleCALayerInUseQuery(

Powered by Google App Engine
This is Rietveld 408576698