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

Unified Diff: cc/test/surface_hittest_test_helpers.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits 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/test/surface_hittest_test_helpers.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/surface_hittest_test_helpers.cc
diff --git a/cc/test/surface_hittest_test_helpers.cc b/cc/test/surface_hittest_test_helpers.cc
index 4183242a0d8ad98f79b6f2cc383122ab7a3f22b1..c5338f41af521fc7da3f0f672434206993024569 100644
--- a/cc/test/surface_hittest_test_helpers.cc
+++ b/cc/test/surface_hittest_test_helpers.cc
@@ -68,28 +68,26 @@ void CreateRenderPass(const RenderPassId& render_pass_id,
render_pass_list->push_back(std::move(render_pass));
}
-std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList(
+CompositorFrame CreateCompositorFrameWithRenderPassList(
RenderPassList* render_pass_list) {
std::unique_ptr<DelegatedFrameData> root_delegated_frame_data(
new DelegatedFrameData);
root_delegated_frame_data->render_pass_list.swap(*render_pass_list);
- std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame);
- root_frame->delegated_frame_data = std::move(root_delegated_frame_data);
+ CompositorFrame root_frame;
+ root_frame.delegated_frame_data = std::move(root_delegated_frame_data);
return root_frame;
}
-std::unique_ptr<CompositorFrame> CreateCompositorFrame(
- const gfx::Rect& root_rect,
- RenderPass** render_pass) {
+CompositorFrame CreateCompositorFrame(const gfx::Rect& root_rect,
+ RenderPass** render_pass) {
RenderPassList render_pass_list;
RenderPassId root_id(1, 1);
CreateRenderPass(root_id, root_rect, gfx::Transform(), &render_pass_list);
- std::unique_ptr<CompositorFrame> root_frame =
+ CompositorFrame root_frame =
CreateCompositorFrameWithRenderPassList(&render_pass_list);
- *render_pass =
- root_frame->delegated_frame_data->render_pass_list.back().get();
+ *render_pass = root_frame.delegated_frame_data->render_pass_list.back().get();
return root_frame;
}
« no previous file with comments | « cc/test/surface_hittest_test_helpers.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698