2018-10-04 14:15:42 +00:00
|
|
|
/******************************************************************************
|
2024-01-17 13:31:45 +00:00
|
|
|
* QSkinny - Copyright (C) The authors
|
2023-04-06 07:23:37 +00:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2018-10-04 14:15:42 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_TEXTURE_RENDERER_H
|
|
|
|
#define QSK_TEXTURE_RENDERER_H
|
|
|
|
|
|
|
|
#include "QskGlobal.h"
|
|
|
|
|
|
|
|
class QSize;
|
2022-06-02 14:02:42 +00:00
|
|
|
class QPainter;
|
2020-11-01 09:43:16 +00:00
|
|
|
class QSGTexture;
|
|
|
|
class QQuickWindow;
|
2018-10-04 14:15:42 +00:00
|
|
|
|
|
|
|
namespace QskTextureRenderer
|
|
|
|
{
|
2022-06-02 14:02:42 +00:00
|
|
|
class PaintHelper
|
2018-10-04 14:15:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2022-03-24 16:12:34 +00:00
|
|
|
PaintHelper() = default;
|
|
|
|
virtual ~PaintHelper() = default;
|
|
|
|
|
2018-10-04 14:15:42 +00:00
|
|
|
virtual void paint( QPainter*, const QSize& ) = 0;
|
2022-03-24 16:12:34 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY( PaintHelper )
|
2018-10-04 14:15:42 +00:00
|
|
|
};
|
|
|
|
|
2022-06-02 14:02:42 +00:00
|
|
|
void setTextureId( QQuickWindow*,
|
|
|
|
quint32 textureId, const QSize&, QSGTexture* );
|
2018-10-04 14:15:42 +00:00
|
|
|
|
2025-02-26 16:07:11 +00:00
|
|
|
quint32 createTextureGL( QQuickWindow*, const QSize&, PaintHelper* );
|
|
|
|
QSGTexture* createTextureRaster( QQuickWindow*, const QSize&, PaintHelper* );
|
2018-10-04 14:15:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|