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

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

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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 uint32_t kArbitraryClientId = 0; 25 static constexpr uint32_t kArbitraryClientId = 0;
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_(kArbitraryClientId, &manager_, &empty_client_) {
36 output_surface_ = FakeOutputSurface::CreateSoftware( 37 output_surface_ = FakeOutputSurface::CreateSoftware(
37 base::WrapUnique(new SoftwareOutputDevice)); 38 base::WrapUnique(new SoftwareOutputDevice));
38 output_surface_->BindToClient(&output_surface_client_); 39 output_surface_->BindToClient(&output_surface_client_);
39 shared_bitmap_manager_.reset(new TestSharedBitmapManager); 40 shared_bitmap_manager_.reset(new TestSharedBitmapManager);
40 41
41 resource_provider_ = FakeResourceProvider::Create( 42 resource_provider_ = FakeResourceProvider::Create(
42 output_surface_.get(), shared_bitmap_manager_.get()); 43 output_surface_.get(), shared_bitmap_manager_.get());
43 } 44 }
44 45
45 void RunTest(int num_surfaces, 46 void RunTest(int num_surfaces,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) { 173 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) {
173 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc"); 174 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc");
174 } 175 }
175 176
176 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) { 177 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) {
177 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged"); 178 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged");
178 } 179 }
179 180
180 } // namespace 181 } // namespace
181 } // namespace cc 182 } // 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