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

Unified Diff: content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h

Issue 2333133003: Make Surface creation lazy for OffscreenCanvasFrameReceiverImpl (Closed)
Patch Set: Rebase 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 | « no previous file | content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.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_frame_receiver_impl.h
diff --git a/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h b/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
index c9e7de3a738956ee1008c678f0b9ab66fc54de6b..c74ded0e54281007a3ffc0160a10f5df62c12209 100644
--- a/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
+++ b/content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.h
@@ -5,12 +5,15 @@
#ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_H_
#define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_FRAME_RECEIVER_IMPL_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 OffscreenCanvasFrameReceiverImpl
- : public blink::mojom::OffscreenCanvasFrameReceiver {
+ : public blink::mojom::OffscreenCanvasFrameReceiver,
+ public cc::SurfaceFactoryClient {
public:
OffscreenCanvasFrameReceiverImpl();
~OffscreenCanvasFrameReceiverImpl() override;
@@ -20,7 +23,16 @@ class OffscreenCanvasFrameReceiverImpl
void SubmitCompositorFrame(const cc::SurfaceId& surface_id,
cc::CompositorFrame 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_;
+
DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasFrameReceiverImpl);
};
« no previous file with comments | « no previous file | content/browser/renderer_host/offscreen_canvas_frame_receiver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698