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

Unified Diff: cc/test/surface_hittest_test_helpers.cc

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: Created 4 years, 1 month 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_aggregator_test_helpers.cc ('k') | cc/test/test_compositor_frame_sink.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 e4e1fa15de189e5456a3e5928fb95fa4c5eaaed8..a64533982d2f925e14b0cd3d80bf90c6e75ceda1 100644
--- a/cc/test/surface_hittest_test_helpers.cc
+++ b/cc/test/surface_hittest_test_helpers.cc
@@ -5,6 +5,7 @@
#include "cc/test/surface_hittest_test_helpers.h"
#include "cc/output/compositor_frame.h"
+#include "cc/output/delegated_frame_data.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/shared_quad_state.h"
#include "cc/quads/solid_color_draw_quad.h"
@@ -67,13 +68,26 @@ void CreateRenderPass(const RenderPassId& render_pass_id,
render_pass_list->push_back(std::move(render_pass));
}
+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);
+ CompositorFrame root_frame;
+ root_frame.delegated_frame_data = std::move(root_delegated_frame_data);
+ return root_frame;
+}
+
CompositorFrame CreateCompositorFrame(const gfx::Rect& root_rect,
RenderPass** render_pass) {
- CompositorFrame root_frame;
+ RenderPassList render_pass_list;
RenderPassId root_id(1, 1);
- CreateRenderPass(root_id, root_rect, gfx::Transform(),
- &root_frame.render_pass_list);
- *render_pass = root_frame.render_pass_list.back().get();
+ CreateRenderPass(root_id, root_rect, gfx::Transform(), &render_pass_list);
+
+ CompositorFrame root_frame =
+ CreateCompositorFrameWithRenderPassList(&render_pass_list);
+
+ *render_pass = root_frame.delegated_frame_data->render_pass_list.back().get();
return root_frame;
}
« no previous file with comments | « cc/test/surface_aggregator_test_helpers.cc ('k') | cc/test/test_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698