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

Unified Diff: cc/output/output_surface_client.h

Issue 2331443003: cc: Split and comment methods for Display vs LayerTreeHostImpl (Closed)
Patch Set: outputsurfacecomments 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 | « cc/output/output_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface_client.h
diff --git a/cc/output/output_surface_client.h b/cc/output/output_surface_client.h
index 472fcc3fa2193e96e4e08d115e363b3da07a40a4..cd91919e6c40cf0cbcb809fe3af1e4d5242027cb 100644
--- a/cc/output/output_surface_client.h
+++ b/cc/output/output_surface_client.h
@@ -25,22 +25,22 @@ struct ManagedMemoryPolicy;
class CC_EXPORT OutputSurfaceClient {
public:
- // Pass the begin frame source for the client to observe. Client does not own
- // the BeginFrameSource. OutputSurface should call this once after binding to
- // the client and then call again with a null while detaching.
- virtual void SetBeginFrameSource(BeginFrameSource* source) = 0;
+ // ============== DISPLAY COMPOSITOR ONLY =======================
+ // From surfaceless/ozone browser compositor output surface.
virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0;
- // For LayerTreeHostImpl, this is more of a OnSwapBuffersAck from the display
- // compositor that it received and will use the frame, unblocking it from
- // producing more frames.
- // For the display compositor this is literally a notification that the swap
- // to the hardware is complete.
- virtual void DidSwapBuffersComplete() = 0;
+ // For overlays.
virtual void DidReceiveTextureInUseResponses(
const gpu::TextureInUseResponses& responses) = 0;
+
+ // ============== LAYER TREE COMPOSITOR ONLY ====================
+
+ // Pass the begin frame source for the client to observe. Client does not own
+ // the BeginFrameSource. OutputSurface should call this once after binding to
+ // the client and then call again with a null while detaching.
+ virtual void SetBeginFrameSource(BeginFrameSource* source) = 0;
virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0;
- virtual void DidLoseOutputSurface() = 0;
+ // For WebView.
virtual void SetExternalTilePriorityConstraints(
const gfx::Rect& viewport_rect,
const gfx::Transform& transform) = 0;
@@ -57,6 +57,19 @@ class CC_EXPORT OutputSurfaceClient {
// can use without changing visibility.
virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) = 0;
+ // ============== BOTH TYPES OF COMPOSITOR ======================
+
+ // For LayerTreeHostImpl, this is more of a OnSwapBuffersAck from the display
+ // compositor that it received and will use the frame, unblocking it from
+ // producing more frames.
+ // For the display compositor this is literally a notification that the swap
+ // to the hardware is complete.
+ virtual void DidSwapBuffersComplete() = 0;
+
+ // Needs thought, if LTHI has only context providers, it needs to register a
+ // lost callback, so we need to support multiple callbacks.
+ virtual void DidLoseOutputSurface() = 0;
+
protected:
virtual ~OutputSurfaceClient() {}
};
« no previous file with comments | « cc/output/output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698