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

Unified Diff: cc/surfaces/compositor_frame_sink_support_client.h

Issue 2543373002: Extract non-Mojo bits of GpuCompositorFrameSink to CompositorFrameSinkSupport (Closed)
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.cc ('k') | services/ui/surfaces/gpu_compositor_frame_sink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/compositor_frame_sink_support_client.h
diff --git a/cc/surfaces/compositor_frame_sink_support_client.h b/cc/surfaces/compositor_frame_sink_support_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3f6dab23e141af7ecbce53857713369cd04b3dc
--- /dev/null
+++ b/cc/surfaces/compositor_frame_sink_support_client.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
+#define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
+
+#include "cc/resources/returned_resource.h"
+
+namespace cc {
+
+struct BeginFrameArgs;
+
+class CompositorFrameSinkSupportClient {
+ public:
+ // Notification that the previous CompositorFrame given to
+ // SubmitCompositorFrame() has been processed and that another frame
+ // can be submitted. This provides backpressure from the display compositor
+ // so that frames are submitted only at the rate it can handle them.
+ // TODO(fsamuel): This method ought not be necessary with unified BeginFrame.
+ // However, there's a fair amount of cleanup and refactoring necessary to get
+ // rid of it.
+ virtual void DidReceiveCompositorFrameAck() = 0;
+
+ // Notification for the client to generate a CompositorFrame.
+ virtual void OnBeginFrame(const BeginFrameArgs& args) = 0;
+
+ // Returns resources sent to SubmitCompositorFrame to be reused or freed.
+ virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0;
+
+ // Called when surface is being scheduled for a draw.
+ virtual void WillDrawSurface() = 0;
+
+ protected:
+ virtual ~CompositorFrameSinkSupportClient() {}
+};
+
+} // namespace cc
+
+#endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.cc ('k') | services/ui/surfaces/gpu_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698