2021-06-02 16:36:24 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "media/view/media_view_overlay_renderer.h"
|
|
|
|
|
|
|
|
namespace Media::View {
|
|
|
|
|
|
|
|
class OverlayWidget::RendererSW final : public OverlayWidget::Renderer {
|
|
|
|
public:
|
2021-06-03 07:11:35 +00:00
|
|
|
explicit RendererSW(not_null<OverlayWidget*> owner);
|
2021-06-02 16:36:24 +00:00
|
|
|
|
|
|
|
void paintFallback(
|
|
|
|
Painter &&p,
|
|
|
|
const QRegion &clip,
|
|
|
|
Ui::GL::Backend backend) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void paintBackground() override;
|
2021-06-04 15:42:02 +00:00
|
|
|
void paintTransformedVideoFrame(ContentGeometry geometry) override;
|
2021-06-02 16:36:24 +00:00
|
|
|
void paintTransformedStaticContent(
|
|
|
|
const QImage &image,
|
2021-06-04 15:42:02 +00:00
|
|
|
ContentGeometry geometry,
|
2021-06-14 11:28:39 +00:00
|
|
|
bool semiTransparent,
|
2021-06-02 16:36:24 +00:00
|
|
|
bool fillTransparentBackground) override;
|
|
|
|
void paintTransformedImage(
|
|
|
|
const QImage &image,
|
|
|
|
QRect rect,
|
|
|
|
int rotation);
|
|
|
|
void paintRadialLoading(
|
|
|
|
QRect inner,
|
|
|
|
bool radial,
|
|
|
|
float64 radialOpacity) override;
|
|
|
|
void paintThemePreview(QRect outer) override;
|
|
|
|
void paintDocumentBubble(QRect outer, QRect icon) override;
|
|
|
|
void paintSaveMsg(QRect outer) override;
|
2021-06-04 15:14:42 +00:00
|
|
|
void paintControlsStart() override;
|
2021-06-02 16:36:24 +00:00
|
|
|
void paintControl(
|
|
|
|
OverState control,
|
|
|
|
QRect outer,
|
|
|
|
float64 outerOpacity,
|
|
|
|
QRect inner,
|
|
|
|
float64 innerOpacity,
|
|
|
|
const style::icon &icon) override;
|
|
|
|
void paintFooter(QRect outer, float64 opacity) override;
|
|
|
|
void paintCaption(QRect outer, float64 opacity) override;
|
|
|
|
void paintGroupThumbs(QRect outer, float64 opacity) override;
|
|
|
|
|
2021-06-04 15:42:02 +00:00
|
|
|
[[nodiscard]] static QRect TransformRect(QRectF geometry, int rotation);
|
|
|
|
|
2021-06-02 16:36:24 +00:00
|
|
|
const not_null<OverlayWidget*> _owner;
|
|
|
|
QBrush _transparentBrush;
|
|
|
|
|
|
|
|
Painter *_p = nullptr;
|
|
|
|
const QRegion *_clip = nullptr;
|
|
|
|
QRect _clipOuter;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Media::View
|