Index: cc/surfaces/surface_aggregator_perftest.cc |
diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc |
index 9743b20de55a8efae32c4de39db6c9074e61cefc..53f9a2e71ef844d25c66eba2b28b152f4067760f 100644 |
--- a/cc/surfaces/surface_aggregator_perftest.cc |
+++ b/cc/surfaces/surface_aggregator_perftest.cc |
@@ -7,10 +7,12 @@ |
#include "cc/output/compositor_frame.h" |
#include "cc/quads/surface_draw_quad.h" |
#include "cc/quads/texture_draw_quad.h" |
+#include "cc/surfaces/framesink_manager_client.h" |
#include "cc/surfaces/surface_aggregator.h" |
#include "cc/surfaces/surface_factory.h" |
#include "cc/surfaces/surface_factory_client.h" |
#include "cc/surfaces/surface_manager.h" |
+#include "cc/surfaces/surface_resource_holder_client.h" |
#include "cc/test/fake_output_surface_client.h" |
#include "cc/test/fake_resource_provider.h" |
#include "cc/test/test_context_provider.h" |
@@ -24,9 +26,19 @@ namespace { |
static const base::UnguessableToken kArbitraryToken = |
base::UnguessableToken::Create(); |
-class EmptySurfaceFactoryClient : public SurfaceFactoryClient { |
+class EmptyClient : public SurfaceFactoryClient, |
danakj
2017/04/21 15:06:48
I suggest breaking this into three StubFooClients.
Alex Z.
2017/04/21 18:14:36
It now uses StubSurfaceFactoryClient. I left a
St
|
+ public FrameSinkManagerClient, |
+ public SurfaceResourceHolderClient { |
public: |
+ // SurfaceFactoryClient implementation. |
+ void ReferencedSurfacesChanged( |
+ const LocalSurfaceId& local_surface_id, |
+ const std::vector<SurfaceId>* active_referenced_surfaces) override {} |
+ |
+ // SurfaceResourceHolderClient implementation. |
void ReturnResources(const ReturnedResourceArray& resources) override {} |
+ |
+ // FrameSinkManagerClient implementation. |
void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} |
}; |
@@ -49,8 +61,8 @@ class SurfaceAggregatorPerfTest : public testing::Test { |
const std::string& name) { |
std::vector<std::unique_ptr<SurfaceFactory>> child_factories(num_surfaces); |
for (int i = 0; i < num_surfaces; i++) |
- child_factories[i].reset( |
- new SurfaceFactory(FrameSinkId(1, i + 1), &manager_, &empty_client_)); |
+ child_factories[i].reset(new SurfaceFactory( |
+ FrameSinkId(1, i + 1), &manager_, &empty_client_, &empty_client_)); |
aggregator_.reset(new SurfaceAggregator(&manager_, resource_provider_.get(), |
optimize_damage)); |
for (int i = 0; i < num_surfaces; i++) { |
@@ -103,7 +115,7 @@ class SurfaceAggregatorPerfTest : public testing::Test { |
} |
SurfaceFactory root_factory(FrameSinkId(1, num_surfaces + 1), &manager_, |
- &empty_client_); |
+ &empty_client_, &empty_client_); |
timer_.Reset(); |
do { |
std::unique_ptr<RenderPass> pass(RenderPass::Create()); |
@@ -144,7 +156,7 @@ class SurfaceAggregatorPerfTest : public testing::Test { |
protected: |
SurfaceManager manager_; |
- EmptySurfaceFactoryClient empty_client_; |
+ EmptyClient empty_client_; |
scoped_refptr<TestContextProvider> context_provider_; |
std::unique_ptr<SharedBitmapManager> shared_bitmap_manager_; |
std::unique_ptr<ResourceProvider> resource_provider_; |