| Index: content/browser/renderer_host/compositing_iosurface_mac.h
|
| diff --git a/content/browser/renderer_host/compositing_iosurface_mac.h b/content/browser/renderer_host/compositing_iosurface_mac.h
|
| index bae6920011e8ace19ce0e186b7bdd96fe2ef14ff..1fa7bd187625351544cc04378d4e286d082f2413 100644
|
| --- a/content/browser/renderer_host/compositing_iosurface_mac.h
|
| +++ b/content/browser/renderer_host/compositing_iosurface_mac.h
|
| @@ -38,6 +38,7 @@ class CompositingIOSurfaceContext;
|
| class CompositingIOSurfaceShaderPrograms;
|
| class CompositingIOSurfaceTransformer;
|
| class RenderWidgetHostViewFrameSubscriber;
|
| +class RenderWidgetHostViewMac;
|
|
|
| // This class manages an OpenGL context and IOSurface for the accelerated
|
| // compositing code path. The GL context is attached to
|
| @@ -55,6 +56,8 @@ class CompositingIOSurfaceMac {
|
| // |order| the desired ordering relationship of the surface to the containing
|
| // window.
|
| static CompositingIOSurfaceMac* Create(int window_number);
|
| + static CompositingIOSurfaceMac* Create(
|
| + const scoped_refptr<CompositingIOSurfaceContext>& context);
|
| ~CompositingIOSurfaceMac();
|
|
|
| // Set IOSurface that will be drawn on the next NSView drawRect.
|
| @@ -66,16 +69,16 @@ class CompositingIOSurfaceMac {
|
| // Get the CGL renderer ID currently associated with this context.
|
| int GetRendererID();
|
|
|
| - // Blit the IOSurface at the upper-left corner of the |view|. If |view| window
|
| - // size is larger than the IOSurface, the remaining right and bottom edges
|
| - // will be white. |scaleFactor| is 1 in normal views, 2 in HiDPI views.
|
| - // |frame_subscriber| listens to this draw event and provides output buffer
|
| - // for copying this frame into.
|
| - void DrawIOSurface(NSView* view,
|
| - float scale_factor,
|
| - int window_number,
|
| - SurfaceOrder surface_order,
|
| - RenderWidgetHostViewFrameSubscriber* frame_subscriber);
|
| + // Blit the IOSurface at the upper-left corner of the of the specified
|
| + // window_size. If the window size is larger than the IOSurface, the
|
| + // remaining right and bottom edges will be white. |scaleFactor| is 1
|
| + // in normal views, 2 in HiDPI views. |frame_subscriber| listens to
|
| + // this draw event and provides output buffer for copying this frame into.
|
| + void DrawIOSurface(const gfx::Size& window_size,
|
| + float window_scale_factor,
|
| + RenderWidgetHostViewFrameSubscriber* frame_subscriber,
|
| + bool using_core_animation);
|
| + void DrawIOSurface(RenderWidgetHostViewMac* render_widget_host_view);
|
|
|
| // Copy the data of the "live" OpenGL texture referring to this IOSurfaceRef
|
| // into |out|. The copied region is specified with |src_pixel_subrect| and
|
| @@ -114,9 +117,14 @@ class CompositingIOSurfaceMac {
|
| }
|
| // In cocoa view units / DIPs.
|
| const gfx::Size& dip_io_surface_size() const { return dip_io_surface_size_; }
|
| + float scale_factor() const { return scale_factor_; }
|
|
|
| bool is_vsync_disabled() const;
|
|
|
| + const scoped_refptr<CompositingIOSurfaceContext>& context() {
|
| + return context_;
|
| + }
|
| +
|
| // Get vsync scheduling parameters.
|
| // |interval_numerator/interval_denominator| equates to fractional number of
|
| // seconds between vsyncs.
|
| @@ -223,7 +231,7 @@ class CompositingIOSurfaceMac {
|
|
|
| CompositingIOSurfaceMac(
|
| IOSurfaceSupport* io_surface_support,
|
| - scoped_refptr<CompositingIOSurfaceContext> context);
|
| + const scoped_refptr<CompositingIOSurfaceContext>& context);
|
|
|
| void SetupCVDisplayLink();
|
|
|
| @@ -315,6 +323,7 @@ class CompositingIOSurfaceMac {
|
| // The width and height of the io surface.
|
| gfx::Size pixel_io_surface_size_; // In pixels.
|
| gfx::Size dip_io_surface_size_; // In view / density independent pixels.
|
| + float scale_factor_;
|
|
|
| // The "live" OpenGL texture referring to this IOSurfaceRef. Note
|
| // that per the CGLTexImageIOSurface2D API we do not need to
|
|
|