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

Unified Diff: cc/surfaces/surface_aggregator_perftest.cc

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SurfaceAggregator tests; fix some bugs revealed by tests Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_aggregator_perftest.cc
diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc
index 71589edd7ec60389cc37c71f4c231a69af92ef56..8330b47a75b94628db16803a8507b85a3c85ae33 100644
--- a/cc/surfaces/surface_aggregator_perftest.cc
+++ b/cc/surfaces/surface_aggregator_perftest.cc
@@ -24,6 +24,13 @@ namespace {
class EmptySurfaceFactoryClient : public SurfaceFactoryClient {
public:
void ReturnResources(const ReturnedResourceArray& resources) override {}
+ void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {}
+};
+
+class EmptySurfaceAggregatorClient : public SurfaceAggregatorClient {
+ public:
+ void AddSurface(Surface* surface) override {}
+ void RemoveSurface(Surface* surface) override {}
};
class SurfaceAggregatorPerfTest : public testing::Test {
@@ -44,7 +51,8 @@ class SurfaceAggregatorPerfTest : public testing::Test {
bool optimize_damage,
bool full_damage,
const std::string& name) {
- aggregator_.reset(new SurfaceAggregator(&manager_, resource_provider_.get(),
+ aggregator_.reset(new SurfaceAggregator(&surface_aggregator_client_,
+ &manager_, resource_provider_.get(),
optimize_damage));
for (int i = 1; i <= num_surfaces; i++) {
factory_.Create(SurfaceId(i));
@@ -139,6 +147,7 @@ class SurfaceAggregatorPerfTest : public testing::Test {
scoped_ptr<SharedBitmapManager> shared_bitmap_manager_;
scoped_ptr<ResourceProvider> resource_provider_;
scoped_ptr<SurfaceAggregator> aggregator_;
+ EmptySurfaceAggregatorClient surface_aggregator_client_;
LapTimer timer_;
};

Powered by Google App Engine
This is Rietveld 408576698