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

Side by Side Diff: cc/surfaces/compositor_frame_sink_support_client.h

Issue 2688613002: RenderWidgetHostViewChildFrame should use CompositorFrameSinkSupport (Closed)
Patch Set: c Created 3 years, 10 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 CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ 5 #ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ 6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
7 7
8 #include "cc/resources/returned_resource.h" 8 #include "cc/resources/returned_resource.h"
9 #include "cc/surfaces/surfaces_export.h"
9 10
10 namespace gfx { 11 namespace gfx {
11 class Rect; 12 class Rect;
12 } 13 }
13 14
14 namespace cc { 15 namespace cc {
15 16
16 class LocalSurfaceId; 17 class LocalSurfaceId;
17 18
18 struct BeginFrameArgs; 19 struct BeginFrameArgs;
19 20
20 class CompositorFrameSinkSupportClient { 21 class CC_SURFACES_EXPORT CompositorFrameSinkSupportClient {
Fady Samuel 2017/02/17 17:29:00 Undo this change.
Saman Sami 2017/02/17 17:31:35 Acknowledged.
21 public: 22 public:
22 // Notification that the previous CompositorFrame given to 23 // Notification that the previous CompositorFrame given to
23 // SubmitCompositorFrame() has been processed and that another frame 24 // SubmitCompositorFrame() has been processed and that another frame
24 // can be submitted. This provides backpressure from the display compositor 25 // can be submitted. This provides backpressure from the display compositor
25 // so that frames are submitted only at the rate it can handle them. 26 // so that frames are submitted only at the rate it can handle them.
26 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. 27 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame.
27 // However, there's a fair amount of cleanup and refactoring necessary to get 28 // However, there's a fair amount of cleanup and refactoring necessary to get
28 // rid of it. 29 // rid of it.
29 virtual void DidReceiveCompositorFrameAck() = 0; 30 virtual void DidReceiveCompositorFrameAck() = 0;
30 31
31 // Notification for the client to generate a CompositorFrame. 32 // Notification for the client to generate a CompositorFrame.
32 virtual void OnBeginFrame(const BeginFrameArgs& args) = 0; 33 virtual void OnBeginFrame(const BeginFrameArgs& args) = 0;
33 34
34 // Returns resources sent to SubmitCompositorFrame to be reused or freed. 35 // Returns resources sent to SubmitCompositorFrame to be reused or freed.
35 virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0; 36 virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0;
36 37
37 // Called when surface is being scheduled for a draw. 38 // Called when surface is being scheduled for a draw.
38 virtual void WillDrawSurface(const LocalSurfaceId& local_surface_id, 39 virtual void WillDrawSurface(const LocalSurfaceId& local_surface_id,
39 const gfx::Rect& damage_rect) = 0; 40 const gfx::Rect& damage_rect) = 0;
40 41
41 protected: 42 protected:
42 virtual ~CompositorFrameSinkSupportClient() {} 43 virtual ~CompositorFrameSinkSupportClient() {}
43 }; 44 };
44 45
45 } // namespace cc 46 } // namespace cc
46 47
47 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ 48 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698