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

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: update gpu pixel test expectation 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_
7 7
8 #include "cc/surfaces/surface_factory.h" 8 #include "cc/surfaces/surface_factory.h"
9 #include "cc/surfaces/surface_factory_client.h" 9 #include "cc/surfaces/surface_factory_client.h"
10 #include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_c anvas_surface.mojom.h" 10 #include "third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_c anvas_surface.mojom.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class OffscreenCanvasFrameReceiverImpl 14 class OffscreenCanvasFrameReceiverImpl
15 : public blink::mojom::OffscreenCanvasFrameReceiver, 15 : public blink::mojom::OffscreenCanvasFrameReceiver,
16 public cc::SurfaceFactoryClient { 16 public cc::SurfaceFactoryClient {
17 public: 17 public:
18 OffscreenCanvasFrameReceiverImpl(); 18 OffscreenCanvasFrameReceiverImpl();
19 ~OffscreenCanvasFrameReceiverImpl() override; 19 ~OffscreenCanvasFrameReceiverImpl() override;
20 20
21 static void Create(blink::mojom::OffscreenCanvasFrameReceiverRequest request); 21 static void Create(blink::mojom::OffscreenCanvasFrameReceiverRequest request);
22 22
23 void SetClient(
24 blink::mojom::OffscreenCanvasFrameReceiverClientPtr client) override;
23 void SubmitCompositorFrame(const cc::SurfaceId& surface_id, 25 void SubmitCompositorFrame(const cc::SurfaceId& surface_id,
24 cc::CompositorFrame frame) override; 26 cc::CompositorFrame frame) override;
25 27
26 // cc::SurfaceFactoryClient implementation. 28 // cc::SurfaceFactoryClient implementation.
27 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 29 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
28 void WillDrawSurface(const cc::SurfaceId& id, 30 void WillDrawSurface(const cc::SurfaceId& id,
29 const gfx::Rect& damage_rect) override; 31 const gfx::Rect& damage_rect) override;
30 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 32 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
31 33
32 private: 34 private:
33 cc::SurfaceId surface_id_; 35 cc::SurfaceId surface_id_;
34 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 36 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
37 blink::mojom::OffscreenCanvasFrameReceiverClientPtr client_;
35 38
36 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasFrameReceiverImpl); 39 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasFrameReceiverImpl);
37 }; 40 };
38 41
39 } // namespace content 42 } // namespace content
40 43
41 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_ 44 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698