surface_id_allocator_set.cc 970 B

1234567891011121314151617181920212223242526
  1. // Copyright 2019 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. #include "components/viz/test/surface_id_allocator_set.h"
  5. namespace viz {
  6. SurfaceIdAllocatorSet::SurfaceIdAllocatorSet() = default;
  7. SurfaceIdAllocatorSet::~SurfaceIdAllocatorSet() = default;
  8. ParentLocalSurfaceIdAllocator* SurfaceIdAllocatorSet::GetAllocator(
  9. const FrameSinkId& frame_sink_id) {
  10. return &allocators_[frame_sink_id];
  11. }
  12. SurfaceId SurfaceIdAllocatorSet::MakeSurfaceId(const FrameSinkId& frame_sink_id,
  13. uint32_t parent_sequence_number,
  14. uint32_t child_sequence_number) {
  15. return SurfaceId(frame_sink_id,
  16. LocalSurfaceId(parent_sequence_number, child_sequence_number,
  17. allocators_[frame_sink_id].GetEmbedToken()));
  18. }
  19. } // namespace viz