#include "media/gpu/vaapi/vaapi_image_decode_accelerator_worker.h"
#include <utility>
#include "base/containers/span.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/trace_event/trace_event.h"
#include "gpu/config/gpu_finch_features.h"
#include "media/gpu/macros.h"
#include "media/gpu/vaapi/vaapi_image_decoder.h"
#include "media/gpu/vaapi/vaapi_jpeg_decoder.h"
#include "media/gpu/vaapi/vaapi_webp_decoder.h"
#include "media/gpu/vaapi/vaapi_wrapper.h"
#include "media/parsers/webp_parser.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "string.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/linux/native_pixmap_dmabuf.h"
#include "ui/gfx/native_pixmap_handle.h"
namespace media {
namespace {
bool IsJpegImage(base::span<const uint8_t> encoded_data) { … }
}
VaapiImageDecoder* VaapiImageDecodeAcceleratorWorker::GetInitializedDecoder(
const std::vector<uint8_t>& encoded_data) { … }
std::unique_ptr<VaapiImageDecodeAcceleratorWorker>
VaapiImageDecodeAcceleratorWorker::Create() { … }
VaapiImageDecodeAcceleratorWorker::VaapiImageDecodeAcceleratorWorker(
VaapiImageDecoderVector decoders,
gpu::ImageDecodeAcceleratorSupportedProfiles supported_profiles)
: … { … }
void VaapiImageDecodeAcceleratorWorker::Destroy() { … }
VaapiImageDecodeAcceleratorWorker::~VaapiImageDecodeAcceleratorWorker() { … }
gpu::ImageDecodeAcceleratorSupportedProfiles
VaapiImageDecodeAcceleratorWorker::GetSupportedProfiles() { … }
void VaapiImageDecodeAcceleratorWorker::DecodeTask(
std::vector<uint8_t> encoded_data,
const gfx::Size& output_size_for_tracing,
gpu::ImageDecodeAcceleratorWorker::CompletedDecodeCB decode_cb) { … }
void VaapiImageDecodeAcceleratorWorker::Decode(
std::vector<uint8_t> encoded_data,
const gfx::Size& output_size,
CompletedDecodeCB decode_cb) { … }
}
namespace std {
void default_delete<media::VaapiImageDecodeAcceleratorWorker>::operator()(
media::VaapiImageDecodeAcceleratorWorker* ptr) const { … }
}