test_latest_local_surface_id_lookup_delegate.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_VIZ_TEST_TEST_LATEST_LOCAL_SURFACE_ID_LOOKUP_DELEGATE_H_
  5. #define COMPONENTS_VIZ_TEST_TEST_LATEST_LOCAL_SURFACE_ID_LOOKUP_DELEGATE_H_
  6. #include "base/containers/flat_map.h"
  7. #include "components/viz/common/surfaces/surface_id.h"
  8. #include "components/viz/service/surfaces/latest_local_surface_id_lookup_delegate.h"
  9. namespace viz {
  10. class TestLatestLocalSurfaceIdLookupDelegate
  11. : public LatestLocalSurfaceIdLookupDelegate {
  12. public:
  13. TestLatestLocalSurfaceIdLookupDelegate();
  14. TestLatestLocalSurfaceIdLookupDelegate(
  15. const TestLatestLocalSurfaceIdLookupDelegate&) = delete;
  16. TestLatestLocalSurfaceIdLookupDelegate& operator=(
  17. const TestLatestLocalSurfaceIdLookupDelegate&) = delete;
  18. ~TestLatestLocalSurfaceIdLookupDelegate() override;
  19. // LatestLocalSurfaceIdLookupDelegate:
  20. LocalSurfaceId GetSurfaceAtAggregation(
  21. const FrameSinkId& frame_sink_id) const override;
  22. void SetSurfaceIdMap(const SurfaceId& surface_id);
  23. private:
  24. base::flat_map<FrameSinkId, LocalSurfaceId> surface_id_map_;
  25. };
  26. } // namespace viz
  27. #endif // COMPONENTS_VIZ_TEST_TEST_LATEST_LOCAL_SURFACE_ID_LOOKUP_DELEGATE_H_