src/ui/scenic/lib/flatland/tests/flatland_unittest.cc
// Tests that Flatland passes the Sysmem token to the Renderer even if the client has not called
// Present(). This is necessary since the client may block on buffers being allocated before
// presenting.
Tests that Flatland passes the Sysmem token to the Renderer even if the client has not called
Present(). This is necessary since the client may block on buffers being allocated before
presenting.
Tests that Flatland passes the Sysmem token to the Renderer even if the client has not called Present () . This is necessary since the client may block on buffers being allocated before presenting .
TEST_F(FlatlandTest, RendererGetsSysmemTokenBeforePresent) {
  Flatland flatland = CreateFlatland();
  const BufferCollectionId kId = 1;
  fidl::InterfaceHandle<fuchsia::sysmem::BufferCollectionToken> token;
  EXPECT_CALL(*mock_renderer_, RegisterTextureCollection(_, _)).WillOnce(Return(1));
  flatland.RegisterBufferCollection(kId, std::move(token));
}
TEST_F ( FlatlandTest , RendererGetsSysmemTokenBeforePresent ) { Flatland flatland = CreateFlatland ( ) ; const BufferCollectionId kId = 1 ; fidl :: InterfaceHandle < fuchsia :: sysmem :: BufferCollectionToken > token ; EXPECT_CALL ( * mock_renderer_ , RegisterTextureCollection ( _ , _ ) ) . WillOnce ( Return ( 1 ) ) ; flatland . RegisterBufferCollection ( kId , std :: move ( token ) ) ; }
Tests that Flatland passes the Sysmem token to the Renderer even if the client has not called
Present().
Tests that Flatland passes the Sysmem token to the Renderer even if the client has not called Present () .
// Register a buffer collection and expect the mock Renderer call, even without presenting.