2023-04-04 18:32:09 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/Forward.h>
|
2023-06-12 08:21:35 -04:00
|
|
|
#include <LibWeb/Painting/MediaPaintable.h>
|
2023-04-04 18:32:09 -04:00
|
|
|
|
|
|
|
|
namespace Web::Painting {
|
|
|
|
|
|
2023-06-12 08:21:35 -04:00
|
|
|
class VideoPaintable final : public MediaPaintable {
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_CELL(VideoPaintable, MediaPaintable);
|
|
|
|
|
GC_DECLARE_ALLOCATOR(VideoPaintable);
|
2023-04-04 18:32:09 -04:00
|
|
|
|
|
|
|
|
public:
|
2024-11-15 04:01:23 +13:00
|
|
|
static GC::Ref<VideoPaintable> create(Layout::VideoBox const&);
|
2023-04-04 18:32:09 -04:00
|
|
|
|
2025-07-31 23:07:26 +02:00
|
|
|
virtual void paint(DisplayListRecordingContext&, PaintPhase) const override;
|
2023-04-04 18:32:09 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
VideoPaintable(Layout::VideoBox const&);
|
2023-04-08 09:14:32 -04:00
|
|
|
|
2025-07-31 23:07:26 +02:00
|
|
|
void paint_placeholder_video_controls(DisplayListRecordingContext&, DevicePixelRect video_rect, Optional<DevicePixelPoint> const& mouse_position) const;
|
2023-04-04 18:32:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|