summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/exported/web_video_frame_submitter.cc
blob: adba8c78e0bff6609a52cd8fdde2c3695598b642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/public/platform/web_video_frame_submitter.h"

#include <memory>
#include <utility>

#include "third_party/blink/renderer/platform/graphics/video_frame_submitter.h"

namespace cc {
class LayerTreeSettings;
class VideoFrameProvider;
}  // namespace cc

namespace gpu {
class GpuMemoryBufferManager;
}

namespace viz {
class ContextProvider;
}

namespace blink {

std::unique_ptr<WebVideoFrameSubmitter> WebVideoFrameSubmitter::Create(
    WebContextProviderCallback context_provider_callback,
    cc::VideoPlaybackRoughnessReporter::ReportingCallback
        roughness_reporting_callback,
    const cc::LayerTreeSettings& settings,
    bool use_sync_primitives) {
  return std::make_unique<VideoFrameSubmitter>(
      std::move(context_provider_callback),
      std::move(roughness_reporting_callback),
      std::make_unique<VideoFrameResourceProvider>(settings,
                                                   use_sync_primitives));
}

}  // namespace blink