wait_and_replace_sync_token_client.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2020 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 MEDIA_BASE_WAIT_AND_REPLACE_SYNC_TOKEN_CLIENT_H_
  5. #define MEDIA_BASE_WAIT_AND_REPLACE_SYNC_TOKEN_CLIENT_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "gpu/command_buffer/common/sync_token.h"
  8. #include "media/base/media_export.h"
  9. #include "media/base/video_frame.h"
  10. namespace gpu {
  11. class InterfaceBase;
  12. }
  13. namespace media {
  14. class MEDIA_EXPORT WaitAndReplaceSyncTokenClient
  15. : public VideoFrame::SyncTokenClient {
  16. public:
  17. explicit WaitAndReplaceSyncTokenClient(gpu::InterfaceBase* ib);
  18. WaitAndReplaceSyncTokenClient(const WaitAndReplaceSyncTokenClient&) = delete;
  19. WaitAndReplaceSyncTokenClient& operator=(
  20. const WaitAndReplaceSyncTokenClient&) = delete;
  21. void GenerateSyncToken(gpu::SyncToken* sync_token) final;
  22. void WaitSyncToken(const gpu::SyncToken& sync_token) final;
  23. private:
  24. raw_ptr<gpu::InterfaceBase> ib_;
  25. };
  26. } // namespace media
  27. #endif // MEDIA_BASE_WAIT_AND_REPLACE_SYNC_TOKEN_CLIENT_H_