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

Side by Side Diff: content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.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_FRAME_RECEIVER_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_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 OffscreenCanvasFrameReceiverImpl
15 : public blink::mojom::OffscreenCanvasFrameReceiver,
16 public cc::SurfaceFactoryClient {
17 public:
18 OffscreenCanvasFrameReceiverImpl();
19 ~OffscreenCanvasFrameReceiverImpl() override;
20
21 static void Create(blink::mojom::OffscreenCanvasFrameReceiverRequest request);
22
23 void SubmitCompositorFrame(const cc::SurfaceId& surface_id,
24 cc::CompositorFrame frame) override;
25
26 // cc::SurfaceFactoryClient implementation.
27 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
28 void WillDrawSurface(const cc::SurfaceId& id,
29 const gfx::Rect& damage_rect) override;
30 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
31
32 private:
33 cc::SurfaceId surface_id_;
34 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
35
36 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasFrameReceiverImpl);
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698