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

Side by Side Diff: cc/surfaces/surface_aggregator_perftest.cc

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "cc/debug/lap_timer.h" 6 #include "cc/debug/lap_timer.h"
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/surface_draw_quad.h" 9 #include "cc/quads/surface_draw_quad.h"
10 #include "cc/quads/texture_draw_quad.h" 10 #include "cc/quads/texture_draw_quad.h"
(...skipping 14 matching lines...) Expand all
25 static constexpr FrameSinkId kArbitraryFrameSinkId(1, 1); 25 static constexpr FrameSinkId kArbitraryFrameSinkId(1, 1);
26 26
27 class EmptySurfaceFactoryClient : public SurfaceFactoryClient { 27 class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
28 public: 28 public:
29 void ReturnResources(const ReturnedResourceArray& resources) override {} 29 void ReturnResources(const ReturnedResourceArray& resources) override {}
30 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} 30 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {}
31 }; 31 };
32 32
33 class SurfaceAggregatorPerfTest : public testing::Test { 33 class SurfaceAggregatorPerfTest : public testing::Test {
34 public: 34 public:
35 SurfaceAggregatorPerfTest() : factory_(&manager_, &empty_client_) { 35 SurfaceAggregatorPerfTest()
36 : factory_(kArbitraryFrameSinkId, &manager_, &empty_client_) {
36 context_provider_ = TestContextProvider::Create(); 37 context_provider_ = TestContextProvider::Create();
37 context_provider_->BindToCurrentThread(); 38 context_provider_->BindToCurrentThread();
38 shared_bitmap_manager_.reset(new TestSharedBitmapManager); 39 shared_bitmap_manager_.reset(new TestSharedBitmapManager);
39 40
40 resource_provider_ = FakeResourceProvider::Create( 41 resource_provider_ = FakeResourceProvider::Create(
41 context_provider_.get(), shared_bitmap_manager_.get()); 42 context_provider_.get(), shared_bitmap_manager_.get());
42 } 43 }
43 44
44 void RunTest(int num_surfaces, 45 void RunTest(int num_surfaces,
45 int num_textures, 46 int num_textures,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) { 171 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) {
171 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc"); 172 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc");
172 } 173 }
173 174
174 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) { 175 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) {
175 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged"); 176 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged");
176 } 177 }
177 178
178 } // namespace 179 } // namespace
179 } // namespace cc 180 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698