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

Unified Diff: cc/surfaces/surface.h

Issue 614073005: Allow CopyOutputRequests on all render passes of a surface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | cc/surfaces/surface.cc » ('j') | cc/surfaces/surface_aggregator.cc » ('J')
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 0df5c1718d56d1d9e5198272e289abef1b03343d..c55dfe84ee57594107d4ce2a969043430f64d54d 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -5,6 +5,7 @@
#ifndef CC_SURFACES_SURFACE_H_
#define CC_SURFACES_SURFACE_H_
+#include <map>
#include <vector>
#include "base/callback.h"
@@ -14,6 +15,7 @@
#include "base/memory/weak_ptr.h"
#include "cc/base/scoped_ptr_vector.h"
#include "cc/output/copy_output_request.h"
+#include "cc/quads/render_pass_id.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surfaces_export.h"
#include "ui/gfx/size.h"
@@ -40,8 +42,10 @@ class CC_SURFACES_EXPORT Surface {
void QueueFrame(scoped_ptr<CompositorFrame> frame,
const base::Closure& draw_callback);
void RequestCopyOfOutput(scoped_ptr<CopyOutputRequest> copy_request);
+ // Adds each CopyOutputRequest in the current frame to copy_requests. The
+ // caller takes ownership of them.
void TakeCopyOutputRequests(
- ScopedPtrVector<CopyOutputRequest>* copy_requests);
+ std::multimap<RenderPassId, CopyOutputRequest*>* copy_requests);
// Returns the most recent frame that is eligible to be rendered.
const CompositorFrame* GetEligibleFrame();
@@ -54,13 +58,14 @@ class CC_SURFACES_EXPORT Surface {
base::WeakPtr<SurfaceFactory> factory() { return factory_; }
private:
+ void ClearCopyRequests();
+
SurfaceId surface_id_;
gfx::Size size_;
base::WeakPtr<SurfaceFactory> factory_;
// TODO(jamesr): Support multiple frames in flight.
scoped_ptr<CompositorFrame> current_frame_;
int frame_index_;
- ScopedPtrVector<CopyOutputRequest> copy_requests_;
base::Closure draw_callback_;
« no previous file with comments | « no previous file | cc/surfaces/surface.cc » ('j') | cc/surfaces/surface_aggregator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698