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

Side by Side Diff: gpu/ipc/service/image_transport_surface_overlay_mac.mm

Issue 1887533002: Add plumbing to command buffer for CALayer min and mag filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix parameter ordering. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/service/image_transport_surface_overlay_mac.h" 5 #include "gpu/ipc/service/image_transport_surface_overlay_mac.h"
6 6
7 #include <CoreGraphics/CoreGraphics.h> 7 #include <CoreGraphics/CoreGraphics.h>
8 #include <IOSurface/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 #include <OpenGL/CGLRenderers.h> 9 #include <OpenGL/CGLRenderers.h>
10 #include <OpenGL/CGLTypes.h> 10 #include <OpenGL/CGLTypes.h>
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 bool ImageTransportSurfaceOverlayMac::ScheduleCALayer( 291 bool ImageTransportSurfaceOverlayMac::ScheduleCALayer(
292 gl::GLImage* contents_image, 292 gl::GLImage* contents_image,
293 const gfx::RectF& contents_rect, 293 const gfx::RectF& contents_rect,
294 float opacity, 294 float opacity,
295 unsigned background_color, 295 unsigned background_color,
296 unsigned edge_aa_mask, 296 unsigned edge_aa_mask,
297 const gfx::RectF& rect, 297 const gfx::RectF& rect,
298 bool is_clipped, 298 bool is_clipped,
299 const gfx::RectF& clip_rect, 299 const gfx::RectF& clip_rect,
300 const gfx::Transform& transform, 300 const gfx::Transform& transform,
301 int sorting_context_id) { 301 int sorting_context_id,
302 unsigned filter) {
302 base::ScopedCFTypeRef<IOSurfaceRef> io_surface; 303 base::ScopedCFTypeRef<IOSurfaceRef> io_surface;
303 if (contents_image) { 304 if (contents_image) {
304 io_surface = 305 io_surface =
305 static_cast<gl::GLImageIOSurface*>(contents_image)->io_surface(); 306 static_cast<gl::GLImageIOSurface*>(contents_image)->io_surface();
306 } 307 }
307 if (!pending_ca_layer_tree_) 308 if (!pending_ca_layer_tree_)
308 pending_ca_layer_tree_.reset(new CALayerTree); 309 pending_ca_layer_tree_.reset(new CALayerTree);
309 return pending_ca_layer_tree_->ScheduleCALayer( 310 return pending_ca_layer_tree_->ScheduleCALayer(
310 is_clipped, gfx::ToEnclosingRect(clip_rect), sorting_context_id, 311 is_clipped, gfx::ToEnclosingRect(clip_rect), sorting_context_id,
311 transform, io_surface, contents_rect, gfx::ToEnclosingRect(rect), 312 transform, io_surface, contents_rect, gfx::ToEnclosingRect(rect),
(...skipping 29 matching lines...) Expand all
341 gl_renderer_id_ = context_renderer_id & kCGLRendererIDMatchingMask; 342 gl_renderer_id_ = context_renderer_id & kCGLRendererIDMatchingMask;
342 343
343 // Post a task holding a reference to the new GL context. The reason for 344 // Post a task holding a reference to the new GL context. The reason for
344 // this is to avoid creating-then-destroying the context for every image 345 // this is to avoid creating-then-destroying the context for every image
345 // transport surface that is observing the GPU switch. 346 // transport surface that is observing the GPU switch.
346 base::MessageLoop::current()->PostTask( 347 base::MessageLoop::current()->PostTask(
347 FROM_HERE, base::Bind(&IOSurfaceContextNoOp, context_on_new_gpu)); 348 FROM_HERE, base::Bind(&IOSurfaceContextNoOp, context_on_new_gpu));
348 } 349 }
349 350
350 } // namespace gpu 351 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/image_transport_surface_overlay_mac.h ('k') | mojo/gpu/mojo_gles2_impl_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698