| Index: cc/surfaces/surface_aggregator_perftest.cc
|
| diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc
|
| index 0d990f0ac9263272a20140c2120c0be62acc9a01..73f617442caf8cfa32a0b1f483a961ca5487880a 100644
|
| --- a/cc/surfaces/surface_aggregator_perftest.cc
|
| +++ b/cc/surfaces/surface_aggregator_perftest.cc
|
| @@ -22,8 +22,6 @@
|
| namespace {
|
|
|
| static constexpr FrameSinkId kArbitraryFrameSinkId(1, 1);
|
| -static const base::UnguessableToken kArbitraryToken =
|
| - base::UnguessableToken::Create();
|
|
|
| class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
|
| public:
|
| @@ -52,7 +50,7 @@
|
| aggregator_.reset(new SurfaceAggregator(&manager_, resource_provider_.get(),
|
| optimize_damage));
|
| for (int i = 1; i <= num_surfaces; i++) {
|
| - LocalFrameId local_frame_id(i, kArbitraryToken);
|
| + LocalFrameId local_frame_id(i, 0);
|
| factory_.Create(local_frame_id);
|
| std::unique_ptr<RenderPass> pass(RenderPass::Create());
|
| CompositorFrame frame;
|
| @@ -89,9 +87,9 @@
|
| if (i > 1) {
|
| SurfaceDrawQuad* surface_quad =
|
| pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
|
| - surface_quad->SetNew(sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1),
|
| - SurfaceId(kArbitraryFrameSinkId,
|
| - LocalFrameId(i - 1, kArbitraryToken)));
|
| + surface_quad->SetNew(
|
| + sqs, gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1),
|
| + SurfaceId(kArbitraryFrameSinkId, LocalFrameId(i - 1, 0)));
|
| }
|
|
|
| frame.render_pass_list.push_back(std::move(pass));
|
| @@ -99,7 +97,7 @@
|
| SurfaceFactory::DrawCallback());
|
| }
|
|
|
| - factory_.Create(LocalFrameId(num_surfaces + 1, kArbitraryToken));
|
| + factory_.Create(LocalFrameId(num_surfaces + 1, 0));
|
| timer_.Reset();
|
| do {
|
| std::unique_ptr<RenderPass> pass(RenderPass::Create());
|
| @@ -110,8 +108,7 @@
|
| pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>();
|
| surface_quad->SetNew(
|
| sqs, gfx::Rect(0, 0, 100, 100), gfx::Rect(0, 0, 100, 100),
|
| - SurfaceId(kArbitraryFrameSinkId,
|
| - LocalFrameId(num_surfaces, kArbitraryToken)));
|
| + SurfaceId(kArbitraryFrameSinkId, LocalFrameId(num_surfaces, 0)));
|
|
|
| if (full_damage)
|
| pass->damage_rect = gfx::Rect(0, 0, 100, 100);
|
| @@ -119,22 +116,21 @@
|
| pass->damage_rect = gfx::Rect(0, 0, 1, 1);
|
|
|
| frame.render_pass_list.push_back(std::move(pass));
|
| - factory_.SubmitCompositorFrame(
|
| - LocalFrameId(num_surfaces + 1, kArbitraryToken), std::move(frame),
|
| - SurfaceFactory::DrawCallback());
|
| + factory_.SubmitCompositorFrame(LocalFrameId(num_surfaces + 1, 0),
|
| + std::move(frame),
|
| + SurfaceFactory::DrawCallback());
|
|
|
| CompositorFrame aggregated = aggregator_->Aggregate(
|
| - SurfaceId(kArbitraryFrameSinkId,
|
| - LocalFrameId(num_surfaces + 1, kArbitraryToken)));
|
| + SurfaceId(kArbitraryFrameSinkId, LocalFrameId(num_surfaces + 1, 0)));
|
| timer_.NextLap();
|
| } while (!timer_.HasTimeLimitExpired());
|
|
|
| perf_test::PrintResult("aggregator_speed", "", name, timer_.LapsPerSecond(),
|
| "runs/s", true);
|
|
|
| - factory_.Destroy(LocalFrameId(num_surfaces + 1, kArbitraryToken));
|
| + factory_.Destroy(LocalFrameId(num_surfaces + 1, 0));
|
| for (int i = 1; i <= num_surfaces; i++)
|
| - factory_.Destroy(LocalFrameId(i, kArbitraryToken));
|
| + factory_.Destroy(LocalFrameId(i, 0));
|
| }
|
|
|
| protected:
|
|
|