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

Unified Diff: cc/surfaces/display_unittest.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/surfaces/display.cc ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display_unittest.cc
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index 7b576ac21a8d41c54b66246b8d985fce43e54e4b..184fc011286f019130bf0b6a3c67811f2afdfd72 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -9,6 +9,7 @@
#include "base/test/null_task_runner.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/copy_output_result.h"
+#include "cc/output/delegated_frame_data.h"
#include "cc/output/texture_mailbox_deleter.h"
#include "cc/quads/render_pass.h"
#include "cc/resources/shared_bitmap_manager.h"
@@ -141,8 +142,11 @@ class DisplayTest : public testing::Test {
protected:
void SubmitCompositorFrame(RenderPassList* pass_list,
const LocalFrameId& local_frame_id) {
+ std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ pass_list->swap(frame_data->render_pass_list);
+
CompositorFrame frame;
- pass_list->swap(frame.render_pass_list);
+ frame.delegated_frame_data = std::move(frame_data);
factory_.SubmitCompositorFrame(local_frame_id, std::move(frame),
SurfaceFactory::DrawCallback());
@@ -340,9 +344,11 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(std::move(pass));
scheduler_->ResetDamageForTest();
+ std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ pass_list.swap(frame_data->render_pass_list);
CompositorFrame frame;
- pass_list.swap(frame.render_pass_list);
+ frame.delegated_frame_data = std::move(frame_data);
frame.metadata.latency_info.push_back(ui::LatencyInfo());
factory_.SubmitCompositorFrame(local_frame_id, std::move(frame),
@@ -371,9 +377,11 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(std::move(pass));
scheduler_->ResetDamageForTest();
+ std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ pass_list.swap(frame_data->render_pass_list);
CompositorFrame frame;
- pass_list.swap(frame.render_pass_list);
+ frame.delegated_frame_data = std::move(frame_data);
factory_.SubmitCompositorFrame(local_frame_id, std::move(frame),
SurfaceFactory::DrawCallback());
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698