mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
bec67b7863
* videoout: synchronize layered flips with premultiplied composition * shader: support unsigned FFBH subword sources * shader: apply cube-face result scaling * shader: prune buffer reads proven out of bounds * net: implement send and receive exports with shared socket handling --------- Co-authored-by: nmzik <Nmzik@mail.ru>
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
#ifndef EMULATOR_SRC_GRAPHICS_PRESENTATION_PRESENTER_H_
|
|
#define EMULATOR_SRC_GRAPHICS_PRESENTATION_PRESENTER_H_
|
|
|
|
#include "common/common.h"
|
|
|
|
#include <memory>
|
|
#include <span>
|
|
|
|
namespace Libs::Graphics {
|
|
|
|
class CommandBuffer;
|
|
class RenderContext;
|
|
struct ImageInfo;
|
|
struct WindowContext;
|
|
|
|
class Presenter final {
|
|
public:
|
|
struct Frame;
|
|
struct Layer {
|
|
Frame* frame;
|
|
int bus;
|
|
bool premultiplied_alpha;
|
|
};
|
|
|
|
explicit Presenter(WindowContext& window);
|
|
~Presenter();
|
|
KYTY_CLASS_NO_COPY(Presenter);
|
|
|
|
[[nodiscard]] Frame& PrepareFrame(CommandBuffer& command, const ImageInfo& info);
|
|
[[nodiscard]] Frame& PrepareBlankFrame(uint32_t width, uint32_t height, bool opaque,
|
|
CommandBuffer* producer = nullptr);
|
|
[[nodiscard]] bool PresentLastFrame();
|
|
[[nodiscard]] bool IsGuestPaused() const noexcept;
|
|
[[nodiscard]] bool NeedsSystemOverlayRefresh() const noexcept;
|
|
[[nodiscard]] RenderContext& Renderer() const noexcept;
|
|
void Present(Frame& frame);
|
|
void Present(std::span<const Layer> layers);
|
|
void ClearLayer(int bus);
|
|
void Discard(Frame& frame);
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> m_impl;
|
|
};
|
|
} // namespace Libs::Graphics
|
|
|
|
#endif // EMULATOR_SRC_GRAPHICS_PRESENTATION_PRESENTER_H_
|