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

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

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: Address Brian's comments. Created 4 years 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_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 cc::CompositorFrame frame) override; 32 cc::CompositorFrame frame) override;
33 void SetNeedsBeginFrame(bool needs_begin_frame) override; 33 void SetNeedsBeginFrame(bool needs_begin_frame) override;
34 void AddSurfaceReferences( 34 void AddSurfaceReferences(
35 const std::vector<cc::SurfaceReference>& references) override; 35 const std::vector<cc::SurfaceReference>& references) override;
36 void RemoveSurfaceReferences( 36 void RemoveSurfaceReferences(
37 const std::vector<cc::SurfaceReference>& references) override; 37 const std::vector<cc::SurfaceReference>& references) override;
38 void EvictFrame() override; 38 void EvictFrame() override;
39 void Require(const cc::LocalFrameId& local_frame_id, 39 void Require(const cc::LocalFrameId& local_frame_id,
40 const cc::SurfaceSequence& sequence) override; 40 const cc::SurfaceSequence& sequence) override;
41 void Satisfy(const cc::SurfaceSequence& sequence) override; 41 void Satisfy(const cc::SurfaceSequence& sequence) override;
42 void BeginFrameDidNotDraw(const cc::BeginFrameAck& ack) override;
42 43
43 // cc::SurfaceFactoryClient implementation. 44 // cc::SurfaceFactoryClient implementation.
44 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 45 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
45 void WillDrawSurface(const cc::LocalFrameId& id, 46 void WillDrawSurface(const cc::LocalFrameId& id,
46 const gfx::Rect& damage_rect) override; 47 const gfx::Rect& damage_rect) override;
47 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 48 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
48 49
49 private: 50 private:
50 void DidReceiveCompositorFrameAck(); 51 void DidReceiveCompositorFrameAck();
51 52
52 cc::SurfaceId surface_id_; 53 cc::SurfaceId surface_id_;
53 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 54 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
54 cc::mojom::MojoCompositorFrameSinkClientPtr client_; 55 cc::mojom::MojoCompositorFrameSinkClientPtr client_;
55 int ack_pending_count_ = 0; 56 int ack_pending_count_ = 0;
56 cc::ReturnedResourceArray surface_returned_resources_; 57 cc::ReturnedResourceArray surface_returned_resources_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasCompositorFrameSink); 59 DISALLOW_COPY_AND_ASSIGN(OffscreenCanvasCompositorFrameSink);
59 }; 60 };
60 61
61 } // namespace content 62 } // namespace content
62 63
63 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_ H_ 64 #endif // CONTENT_BROWSER_RENDERER_HOST_OFFSCREEN_CANVAS_COMPOSITOR_FRAME_SINK_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698