// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_GPU_VAAPI_TEST_FAKE_LIBVA_DRIVER_FAKE_IMAGE_H_ #define MEDIA_GPU_VAAPI_TEST_FAKE_LIBVA_DRIVER_FAKE_IMAGE_H_ #include <va/va.h> #include "base/memory/raw_ref.h" namespace media::internal { class FakeBuffer; class FakeDriver; // Class used for tracking a VAImage and all information relevant to it. // // The metadata (ID, format, dimensions, number of planes, and plane // stride/offset) of a FakeImage is immutable. The accessors for such metadata // are thread-safe. The contents of the backing FakeBuffer object are mutable, // but the reference to that FakeBuffer is immutable, i.e., the backing buffer // is always the same, but the contents may change. Thus, while the accessor for // the FakeBuffer is thread-safe, writes and reads to this buffer must be // synchronized externally. // // Note: Currently the FakeImage only supports the NV12 image format. class FakeImage { … }; } // namespace media::internal #endif // MEDIA_GPU_VAAPI_TEST_FAKE_LIBVA_DRIVER_FAKE_IMAGE_H_