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

Unified Diff: cc/surfaces/surface_synchronization_unittest.cc

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: Pass ack via SurfaceDamaged, add back tests. 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_synchronization_unittest.cc
diff --git a/cc/surfaces/surface_synchronization_unittest.cc b/cc/surfaces/surface_synchronization_unittest.cc
index 5846fb9476ab68950f8e4806e2f92dcac7cd28d2..9d70a8bcb12a6938c9798fe0ed11f3c6d794285f 100644
--- a/cc/surfaces/surface_synchronization_unittest.cc
+++ b/cc/surfaces/surface_synchronization_unittest.cc
@@ -152,10 +152,16 @@ class SurfaceSynchronizationTest : public testing::Test,
// SurfaceObserver implementation:
void OnSurfaceCreated(const SurfaceInfo& surface_info) override {}
- void OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) override {
- damaged_surfaces_.insert(surface_id);
+ void OnSurfaceDamaged(const SurfaceId& surface_id,
+ const BeginFrameAck& ack,
+ bool* changed) override {
+ if (ack.has_damage)
+ damaged_surfaces_.insert(surface_id);
}
void OnSurfaceDiscarded(const SurfaceId& surface_id) override {}
+ void OnSurfaceDestroyed(const SurfaceId& surface_id) override {}
+ void OnSurfaceDamageExpected(const SurfaceId& surface_id,
+ const BeginFrameArgs& args) override {}
protected:
testing::NiceMock<MockCompositorFrameSinkSupportClient> support_client_;
@@ -976,10 +982,6 @@ TEST_F(SurfaceSynchronizationTest,
ui::DISPLAY_COMPOSITOR_RECEIVED_FRAME_COMPONENT, nullptr));
}
-// TODO(eseckler): Add back tests for BeginFrameAck forwarding through
-// CompositorFrameSinkSupport when we add plumbing of BeginFrameAcks through
-// SurfaceObservers.
-
// Checks that resources and ack are sent together if possible.
TEST_F(SurfaceSynchronizationTest, ReturnResourcesWithAck) {
const SurfaceId parent_id = MakeSurfaceId(kParentFrameSink, 1);

Powered by Google App Engine
This is Rietveld 408576698