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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
diff --git a/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h b/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
new file mode 100644
index 0000000000000000000000000000000000000000..c7697e18acedfc6d56029ab1eca2ce24ce362564
--- /dev/null
+++ b/content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
@@ -0,0 +1,49 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_
+#define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_
+
+#include "cc/surfaces/surface_factory.h"
+#include "cc/surfaces/surface_factory_client.h"
+#include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom.h"
+
+namespace content {
+
+class OffscreenCanvasCompositorFrameSink
+ : public cc::mojom::MojoCompositorFrameSink,
+ public cc::SurfaceFactoryClient {
+ public:
+ OffscreenCanvasCompositorFrameSink(
+ const cc::SurfaceId& surface_id,
+ cc::mojom::MojoCompositorFrameSinkClientPtr client);
+ ~OffscreenCanvasCompositorFrameSink() override;
+
+ static void Create(const cc::SurfaceId& surface_id,
+ cc::mojom::MojoCompositorFrameSinkClientPtr client,
+ cc::mojom::MojoCompositorFrameSinkRequest request);
+
+ // cc::mojom::MojoCompositorFrameSink implementation.
+ void SubmitCompositorFrame(
+ cc::CompositorFrame frame,
+ const SubmitCompositorFrameCallback& callback) override;
+ void SetNeedsBeginFrame(bool needs_begin_frame) override;
+
+ // cc::SurfaceFactoryClient implementation.
+ void ReturnResources(const cc::ReturnedResourceArray& resources) override;
+ void WillDrawSurface(const cc::SurfaceId& id,
+ const gfx::Rect& damage_rect) override;
+ void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
+
+ private:
+ cc::SurfaceId surface_id_;
+ std::unique_ptr<cc::SurfaceFactory> surface_factory_;
+ cc::mojom::MojoCompositorFrameSinkClientPtr client_;
+
+ DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasCompositorFrameSink);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_
« 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