| Index: content/browser/renderer_host/render_widget_host_view_mac.h
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
|
| index c8fa95c59d871bffb382ee24d42e68165daff75c..6dd7d6660df08725b22b8465e9c18d929e68b091 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
| @@ -17,6 +17,7 @@
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/time/time.h"
|
| #include "content/browser/compositor/delegated_frame_host.h"
|
| +#include "content/browser/renderer_host/compositing_iosurface_layer_mac.h"
|
| #include "content/browser/renderer_host/display_link_mac.h"
|
| #include "content/browser/renderer_host/render_widget_host_view_base.h"
|
| #include "content/browser/renderer_host/software_frame_manager.h"
|
| @@ -41,9 +42,11 @@ class Compositor;
|
| class Layer;
|
| }
|
|
|
| +@class BrowserCompositorViewMac;
|
| @class CompositingIOSurfaceLayer;
|
| @class FullscreenWindowManager;
|
| @protocol RenderWidgetHostViewMacDelegate;
|
| +@class SoftwareLayer;
|
| @class ToolTip;
|
|
|
| @protocol RenderWidgetHostViewMacOwner
|
| @@ -186,20 +189,6 @@ class Layer;
|
| actualRange:(NSRangePointer)actualRange;
|
| @end
|
|
|
| -@interface SoftwareLayer : CALayer
|
| -
|
| -- (id)init;
|
| -
|
| -- (void)setContentsToData:(const void *)data
|
| - withRowBytes:(size_t)rowBytes
|
| - withPixelSize:(gfx::Size)pixelSize
|
| - withScaleFactor:(float)scaleFactor;
|
| -
|
| -// Remove the layer from the layer hierarchy.
|
| -- (void)disableRendering;
|
| -
|
| -@end
|
| -
|
| namespace content {
|
| class RenderWidgetHostImpl;
|
|
|
| @@ -223,7 +212,8 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
| : public RenderWidgetHostViewBase,
|
| public DelegatedFrameHostClient,
|
| public IPC::Sender,
|
| - public SoftwareFrameManagerClient {
|
| + public SoftwareFrameManagerClient,
|
| + public CompositingIOSurfaceLayerClient {
|
| public:
|
| // The view will associate itself with the given widget. The native view must
|
| // be hooked up immediately to the view hierarchy, or else when it is
|
| @@ -353,6 +343,10 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
|
|
| virtual SkBitmap::Config PreferredReadbackFormat() OVERRIDE;
|
|
|
| + // CompositingIOSurfaceLayerClient implementation.
|
| + virtual void AcceleratedLayerDidDrawFrame(bool succeeded) OVERRIDE;
|
| + virtual bool AcceleratedLayerHasNotAckedPendingFrame() const OVERRIDE;
|
| +
|
| // Forwards the mouse event to the renderer.
|
| void ForwardMouseEvent(const blink::WebMouseEvent& event);
|
|
|
| @@ -372,10 +366,6 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
| float scale_factor,
|
| const std::vector<ui::LatencyInfo>& latency_info);
|
|
|
| - void GotBrowserCompositorSoftwareFrame(cc::SoftwareFrameData* frame_data,
|
| - float scale_factor,
|
| - SkCanvas* canvas);
|
| -
|
| // Draw the IOSurface by making its context current to this view.
|
| void DrawIOSurfaceWithoutCoreAnimation();
|
|
|
| @@ -451,17 +441,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
| // Accelerated compositing structures. These may be dynamically created and
|
| // destroyed together in Create/DestroyCompositedIOSurfaceAndLayer.
|
| base::scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
|
| - scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
|
| + scoped_refptr<CompositingIOSurfaceMac> compositing_iosurface_;
|
| scoped_refptr<CompositingIOSurfaceContext> compositing_iosurface_context_;
|
|
|
| - // Timer used to dynamically transition the compositing layer in and out of
|
| - // asynchronous mode.
|
| - base::DelayTimer<RenderWidgetHostViewMac>
|
| - compositing_iosurface_layer_async_timer_;
|
| -
|
| // Delegated frame management and compositior.
|
| + base::scoped_nsobject<BrowserCompositorViewMac> browser_compositor_view_;
|
| scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
|
| - scoped_ptr<ui::Compositor> compositor_;
|
| scoped_ptr<ui::Layer> root_layer_;
|
|
|
| // This holds the current software compositing framebuffer, if any.
|
| @@ -528,8 +513,6 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
| // update the scale factor of the layers.
|
| void LayoutLayers();
|
|
|
| - bool HasPendingSwapAck() const { return pending_swap_ack_; }
|
| -
|
| // DelegatedFrameHostClient implementation.
|
| virtual ui::Compositor* GetCompositor() const OVERRIDE;
|
| virtual ui::Layer* GetLayer() OVERRIDE;
|
| @@ -595,10 +578,6 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
| // Called when a software DIB is received.
|
| void GotSoftwareFrame();
|
|
|
| - // Called if it has been a quarter-second since a GPU SwapBuffers has been
|
| - // received. In this case, switch from polling for frames to pushing them.
|
| - void TimerSinceGotAcceleratedFrameFired();
|
| -
|
| // IPC message handlers.
|
| void OnPluginFocusChanged(bool focused, int plugin_id);
|
| void OnStartPluginIme();
|
|
|