struct AcceleratedSurfaceMsg_BufferPresented_Params;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
-struct GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params;
namespace gfx {
class GLSurface;
public:
ImageTransportSurface();
+#if defined(OS_MACOSX)
virtual void OnBufferPresented(
const AcceleratedSurfaceMsg_BufferPresented_Params& params) = 0;
+#endif
virtual void OnResize(gfx::Size size, float scale_factor) = 0;
virtual void SetLatencyInfo(
const std::vector<ui::LatencyInfo>& latency_info) = 0;
GpuCommandBufferStub* stub,
const gfx::GLSurfaceHandle& handle);
+#if defined(OS_ANDROID)
+ static scoped_refptr<gfx::GLSurface> CreateTransportSurface(
+ GpuChannelManager* manager,
+ GpuCommandBufferStub* stub,
+ const gfx::GLSurfaceHandle& handle);
+#endif
+
DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface);
};
GpuChannelManager* manager,
GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
- virtual ~ImageTransportHelper();
+ ~ImageTransportHelper() override;
bool Initialize();
- void Destroy();
// IPC::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ bool OnMessageReceived(const IPC::Message& message) override;
// Helper send functions. Caller fills in the surface specific params
// like size and surface id. The helper fills in the rest.
void SendAcceleratedSurfaceBuffersSwapped(
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params);
- void SendAcceleratedSurfacePostSubBuffer(
- GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params params);
- void SendAcceleratedSurfaceRelease();
void SendUpdateVSyncParameters(
base::TimeTicks timebase, base::TimeDelta interval);
- void SendLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
+ void SwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info);
// Whether or not we should execute more commands.
void SetScheduled(bool is_scheduled);
// Set the default swap interval on the surface.
static void SetSwapInterval(gfx::GLContext* context);
- void Suspend();
-
GpuChannelManager* manager() const { return manager_; }
GpuCommandBufferStub* stub() const { return stub_.get(); }
gpu::gles2::GLES2Decoder* Decoder();
// IPC::Message handlers.
+#if defined(OS_MACOSX)
void OnBufferPresented(
const AcceleratedSurfaceMsg_BufferPresented_Params& params);
+#endif
void OnWakeUpGpu();
// Backbuffer resize callback.
gfx::GLSurface* surface);
// GLSurface implementation.
- virtual bool Initialize() OVERRIDE;
- virtual void Destroy() OVERRIDE;
- virtual bool SwapBuffers() OVERRIDE;
- virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
- virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
+ bool Initialize() override;
+ void Destroy() override;
+ bool SwapBuffers() override;
+ bool PostSubBuffer(int x, int y, int width, int height) override;
+ bool OnMakeCurrent(gfx::GLContext* context) override;
// ImageTransportSurface implementation.
- virtual void OnBufferPresented(
- const AcceleratedSurfaceMsg_BufferPresented_Params& params) OVERRIDE;
- virtual void OnResize(gfx::Size size, float scale_factor) OVERRIDE;
- virtual gfx::Size GetSize() OVERRIDE;
- virtual void SetLatencyInfo(
- const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE;
- virtual void WakeUpGpu() OVERRIDE;
+#if defined(OS_MACOSX)
+ void OnBufferPresented(
+ const AcceleratedSurfaceMsg_BufferPresented_Params& params) override;
+#endif
+ void OnResize(gfx::Size size, float scale_factor) override;
+ gfx::Size GetSize() override;
+ void SetLatencyInfo(
+ const std::vector<ui::LatencyInfo>& latency_info) override;
+ void WakeUpGpu() override;
protected:
- virtual ~PassThroughImageTransportSurface();
+ ~PassThroughImageTransportSurface() override;
// If updated vsync parameters can be determined, send this information to
// the browser.