OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_ | |
7 | |
8 #include "cc/surfaces/surface_factory.h" | |
9 #include "cc/surfaces/surface_factory_client.h" | |
10 #include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_c anvas_surface.mojom.h" | |
11 | |
12 namespace content { | |
13 | |
14 class OffscreenCanvasCompositorFrameSink | |
15 : public cc::mojom::MojoCompositorFrameSink, | |
16 public cc::SurfaceFactoryClient { | |
17 public: | |
18 OffscreenCanvasCompositorFrameSink( | |
19 const cc::SurfaceId& surface_id, | |
20 cc::mojom::MojoCompositorFrameSinkClientPtr client); | |
21 ~OffscreenCanvasCompositorFrameSink() override; | |
22 | |
23 static void Create(const cc::SurfaceId& surface_id, | |
24 cc::mojom::MojoCompositorFrameSinkClientPtr client, | |
25 cc::mojom::MojoCompositorFrameSinkRequest request); | |
26 | |
27 void SubmitCompositorFrame( | |
danakj
2016/09/19 20:29:25
Put a comment above these that say what interface/
| |
28 cc::CompositorFrame frame, | |
29 const SubmitCompositorFrameCallback& callback) override; | |
30 void SetNeedsBeginFrame(bool needs_begin_frame) override; | |
31 | |
32 // cc::SurfaceFactoryClient implementation. | |
33 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | |
34 void WillDrawSurface(const cc::SurfaceId& id, | |
35 const gfx::Rect& damage_rect) override; | |
36 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | |
37 | |
38 private: | |
39 cc::SurfaceId surface_id_; | |
40 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | |
41 cc::mojom::MojoCompositorFrameSinkClientPtr client_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasCompositorFrameSink); | |
44 }; | |
45 | |
46 } // namespace content | |
47 | |
48 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_ H_ | |
OLD | NEW |