Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h

Issue 2328463004: Implement WebGL's commit on the main thread (Closed)
Patch Set: fix compile error on win_dbg Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 // cc::mojom::MojoCompositorFrameSink implementation.
28 void SubmitCompositorFrame(
29 cc::CompositorFrame frame,
30 const SubmitCompositorFrameCallback& callback) override;
31 void SetNeedsBeginFrame(bool needs_begin_frame) override;
32
33 // cc::SurfaceFactoryClient implementation.
34 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
35 void WillDrawSurface(const cc::SurfaceId& id,
36 const gfx::Rect& damage_rect) override;
37 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
38
39 private:
40 cc::SurfaceId surface_id_;
41 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
42 cc::mojom::MojoCompositorFrameSinkClientPtr client_;
43
44 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasCompositorFrameSink);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_ H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698