| Index: content/browser/compositor/gpu_browser_compositor_output_surface.h
|
| diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.h b/content/browser/compositor/gpu_browser_compositor_output_surface.h
|
| index 1f5f8d3944c778c72d4979343c658c1ff86080c6..60d74db7c7cff8f87de37b3801a1cafc323ee4e0 100644
|
| --- a/content/browser/compositor/gpu_browser_compositor_output_surface.h
|
| +++ b/content/browser/compositor/gpu_browser_compositor_output_surface.h
|
| @@ -7,8 +7,8 @@
|
|
|
| #include <memory>
|
|
|
| -#include "base/cancelable_callback.h"
|
| #include "base/macros.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "build/build_config.h"
|
| #include "content/browser/compositor/browser_compositor_output_surface.h"
|
| #include "ui/gfx/swap_result.h"
|
| @@ -43,13 +43,18 @@ class GpuBrowserCompositorOutputSurface
|
|
|
| ~GpuBrowserCompositorOutputSurface() override;
|
|
|
| - protected:
|
| - // BrowserCompositorOutputSurface:
|
| - void OnReflectorChanged() override;
|
| - void OnGpuSwapBuffersCompleted(
|
| + // Called when a swap completion is sent from the GPU process.
|
| + // The argument |params_mac| is used to communicate parameters needed on Mac
|
| + // to display the CALayer for the swap in the browser process.
|
| + // TODO(ccameron): Remove |params_mac| when the CALayer tree is hosted in the
|
| + // browser process.
|
| + virtual void OnGpuSwapBuffersCompleted(
|
| const std::vector<ui::LatencyInfo>& latency_info,
|
| gfx::SwapResult result,
|
| - const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) override;
|
| + const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac);
|
| +
|
| + // BrowserCompositorOutputSurface implementation.
|
| + void OnReflectorChanged() override;
|
| #if defined(OS_MACOSX)
|
| void SetSurfaceSuspendedForRecycle(bool suspended) override;
|
| #endif
|
| @@ -65,18 +70,11 @@ class GpuBrowserCompositorOutputSurface
|
| unsigned GetOverlayTextureId() const override;
|
| bool SurfaceIsSuspendForRecycle() const override;
|
|
|
| + protected:
|
| gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
|
|
|
| - base::CancelableCallback<void(
|
| - const std::vector<ui::LatencyInfo>&,
|
| - gfx::SwapResult,
|
| - const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)>
|
| - swap_buffers_completion_callback_;
|
| - base::CancelableCallback<void(base::TimeTicks timebase,
|
| - base::TimeDelta interval)>
|
| - update_vsync_parameters_callback_;
|
| -
|
| std::unique_ptr<ReflectorTexture> reflector_texture_;
|
| + base::WeakPtrFactory<GpuBrowserCompositorOutputSurface> weak_ptr_factory_;
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
|
|
|