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

Unified Diff: cc/surfaces/surface.h

Issue 2098953003: Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed exo unittests Created 4 years, 6 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/surfaces/display_unittest.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 7c44be4b51c1b97909b9875419aa3df047396870..c3226aaa069e2eefa526fcc6e98af20c3b33ce33 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -54,16 +54,18 @@ class CC_SURFACES_EXPORT Surface {
return gpu_memory_buffer_client_id_;
}
- void QueueFrame(std::unique_ptr<CompositorFrame> frame,
- const DrawCallback& draw_callback);
+ void QueueFrame(CompositorFrame frame, const DrawCallback& draw_callback);
void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> copy_request);
// Adds each CopyOutputRequest in the current frame to copy_requests. The
// caller takes ownership of them.
void TakeCopyOutputRequests(
std::multimap<RenderPassId, std::unique_ptr<CopyOutputRequest>>*
copy_requests);
+
// Returns the most recent frame that is eligible to be rendered.
- const CompositorFrame* GetEligibleFrame();
+ // If the CompositorFrame's DelegateFrameData is null then there is
+ // no eligible frame.
+ const CompositorFrame& GetEligibleFrame();
// Returns a number that increments by 1 every time a new frame is enqueued.
int frame_index() const { return frame_index_; }
@@ -102,7 +104,7 @@ class CC_SURFACES_EXPORT Surface {
int gpu_memory_buffer_client_id_ = -1;
base::WeakPtr<SurfaceFactory> factory_;
// TODO(jamesr): Support multiple frames in flight.
- std::unique_ptr<CompositorFrame> current_frame_;
+ CompositorFrame current_frame_;
int frame_index_;
bool destroyed_;
std::vector<SurfaceSequence> destruction_dependencies_;
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698