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

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

Issue 2872883002: Rename EvictFrame, EvictSurface to EvictCurrentSurface (Closed)
Patch Set: Rebase Created 3 years, 7 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/base/lap_timer.h" 6 #include "cc/base/lap_timer.h"
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/quads/surface_draw_quad.h" 8 #include "cc/quads/surface_draw_quad.h"
9 #include "cc/quads/texture_draw_quad.h" 9 #include "cc/quads/texture_draw_quad.h"
10 #include "cc/surfaces/compositor_frame_sink_support.h" 10 #include "cc/surfaces/compositor_frame_sink_support.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 CompositorFrame aggregated = aggregator_->Aggregate( 140 CompositorFrame aggregated = aggregator_->Aggregate(
141 SurfaceId(FrameSinkId(1, num_surfaces + 1), 141 SurfaceId(FrameSinkId(1, num_surfaces + 1),
142 LocalSurfaceId(num_surfaces + 1, kArbitraryToken))); 142 LocalSurfaceId(num_surfaces + 1, kArbitraryToken)));
143 timer_.NextLap(); 143 timer_.NextLap();
144 } while (!timer_.HasTimeLimitExpired()); 144 } while (!timer_.HasTimeLimitExpired());
145 145
146 perf_test::PrintResult("aggregator_speed", "", name, timer_.LapsPerSecond(), 146 perf_test::PrintResult("aggregator_speed", "", name, timer_.LapsPerSecond(),
147 "runs/s", true); 147 "runs/s", true);
148 for (int i = 0; i < num_surfaces; i++) 148 for (int i = 0; i < num_surfaces; i++)
149 child_supports[i]->EvictFrame(); 149 child_supports[i]->EvictCurrentSurface();
150 root_support->EvictFrame(); 150 root_support->EvictCurrentSurface();
151 } 151 }
152 152
153 protected: 153 protected:
154 SurfaceManager manager_; 154 SurfaceManager manager_;
155 scoped_refptr<TestContextProvider> context_provider_; 155 scoped_refptr<TestContextProvider> context_provider_;
156 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_; 156 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_;
157 std::unique_ptr<ResourceProvider> resource_provider_; 157 std::unique_ptr<ResourceProvider> resource_provider_;
158 std::unique_ptr<SurfaceAggregator> aggregator_; 158 std::unique_ptr<SurfaceAggregator> aggregator_;
159 LapTimer timer_; 159 LapTimer timer_;
160 }; 160 };
(...skipping 21 matching lines...) Expand all
182 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) { 182 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesDamageCalc) {
183 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc"); 183 RunTest(3, 1000, 1.f, true, true, "few_surfaces_damage_calc");
184 } 184 }
185 185
186 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) { 186 TEST_F(SurfaceAggregatorPerfTest, FewSurfacesAggregateDamaged) {
187 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged"); 187 RunTest(3, 1000, 1.f, true, false, "few_surfaces_aggregate_damaged");
188 } 188 }
189 189
190 } // namespace 190 } // namespace
191 } // namespace cc 191 } // 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