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

Unified Diff: cc/surfaces/surfaces_pixeltest.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/surfaces_pixeltest.cc
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc
index a584f7c806ddb876489ab11255d904878faaefd8..f0724d800a5f61b5871f95bdb9477f08f789d5fa 100644
--- a/cc/surfaces/surfaces_pixeltest.cc
+++ b/cc/surfaces/surfaces_pixeltest.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 SurfacesPixelTest : public RendererPixelTest<GLRenderer> {
@@ -83,7 +90,9 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
factory_.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
SurfaceFactory::DrawCallback());
- SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
+ EmptySurfaceAggregatorClient surface_aggregator_client;
+ SurfaceAggregator aggregator(&surface_aggregator_client, &manager_,
+ resource_provider_.get(), true);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator.Aggregate(root_surface_id);
factory_.Destroy(root_surface_id);
@@ -167,7 +176,9 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) {
SurfaceFactory::DrawCallback());
}
- SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
+ EmptySurfaceAggregatorClient surface_aggregator_client;
+ SurfaceAggregator aggregator(&surface_aggregator_client, &manager_,
+ resource_provider_.get(), true);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator.Aggregate(root_surface_id);
@@ -310,7 +321,9 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
SurfaceFactory::DrawCallback());
}
- SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
+ EmptySurfaceAggregatorClient surface_aggregator_client;
+ SurfaceAggregator aggregator(&surface_aggregator_client, &manager_,
+ resource_provider_.get(), true);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator.Aggregate(root_surface_id);

Powered by Google App Engine
This is Rietveld 408576698