MythTV
master
|
#include <libmythui/mythpainter.h>
Public Member Functions | |
MythPainter () | |
~MythPainter () override=default | |
MythPainter destructor. More... | |
virtual QString | GetName (void)=0 |
virtual bool | SupportsAnimation (void)=0 |
virtual bool | SupportsAlpha (void)=0 |
virtual bool | SupportsClipping (void)=0 |
virtual void | FreeResources (void) |
virtual void | Begin (QPaintDevice *) |
virtual void | End () |
virtual void | SetClipRect (QRect clipRect) |
virtual void | SetClipRegion (const QRegion &clipRegion) |
virtual void | Clear (QPaintDevice *device, const QRegion ®ion) |
virtual void | DrawImage (QRect dest, MythImage *im, QRect src, int alpha)=0 |
void | DrawImage (int x, int y, MythImage *im, int alpha) |
void | DrawImage (QPoint topLeft, MythImage *im, int alph) |
virtual void | DrawProcedural (QRect, int, const ProcSource &, const ProcSource &, const QString &) |
virtual void | DrawText (QRect r, const QString &msg, int flags, const MythFontProperties &font, int alpha, QRect boundRect) |
virtual void | DrawTextLayout (QRect canvasRect, const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, int alpha, QRect destRect) |
virtual void | DrawRect (QRect area, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | DrawRoundRect (QRect area, int cornerRadius, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | DrawEllipse (QRect area, const QBrush &fillBrush, const QPen &linePen, int alpha) |
virtual void | PushTransformation ([[maybe_unused]] const UIEffects &zoom, [[maybe_unused]] QPointF center=QPointF()) |
virtual void | PopTransformation (void) |
MythImage * | GetFormatImage () |
Returns a blank reference counted image in the format required for the Draw functions for this painter. More... | |
void | DeleteFormatImage (MythImage *im) |
void | SetDebugMode (bool showBorders, bool showNames) |
bool | ShowBorders (void) const |
bool | ShowTypeNames (void) const |
void | SetMaximumCacheSizes (int hardware, int software) |
Protected Member Functions | |
MythImage * | GetImageFromString (const QString &msg, int flags, QRect r, const MythFontProperties &font) |
MythImage * | GetImageFromTextLayout (const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, QRect &canvas, QRect &dest) |
MythImage * | GetImageFromRect (QRect area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen) |
virtual MythImage * | GetFormatImagePriv (void)=0 |
Creates a reference counted image, call DecrRef() to delete. More... | |
virtual void | DeleteFormatImagePriv (MythImage *im)=0 |
void | ExpireImages (int64_t max=0) |
virtual void | Teardown (void) |
void | CheckFormatImage (MythImage *im) |
Static Protected Member Functions | |
static void | DrawTextPriv (MythImage *im, const QString &msg, int flags, QRect r, const MythFontProperties &font) |
static void | DrawRectPriv (MythImage *im, QRect area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen) |
Protected Attributes | |
float | m_frameTime { 0 } |
int | m_hardwareCacheSize { 0 } |
int | m_maxHardwareCacheSize { 0 } |
Private Attributes | |
int64_t | m_softwareCacheSize {0} |
int64_t | m_maxSoftwareCacheSize {48LL * 1024 * 1024} |
QMutex | m_allocationLock |
QSet< MythImage * > | m_allocatedImages |
QMap< QString, MythImage * > | m_stringToImageMap |
std::list< QString > | m_stringExpireList |
bool | m_showBorders {false} |
bool | m_showNames {false} |
Definition at line 34 of file mythpainter.h.
MythPainter::MythPainter | ( | ) |
Definition at line 23 of file mythpainter.cpp.
|
overridedefault |
MythPainter destructor.
The MythPainter destructor does not cleanup, it is unsafe to do cleanup in the MythPainter destructor because DeleteImagePriv() is a pure virtual in this class. Instead children should call MythPainter::Teardown() for cleanup.
|
pure virtual |
Implemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Referenced by MythMainWindow::Init().
|
pure virtual |
Implemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Referenced by MythScreenStack::EnableEffects().
|
pure virtual |
Implemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Referenced by MythScreenStack::EnableEffects().
|
pure virtual |
Implemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Referenced by MythMainWindow::Draw(), and MythMainWindow::drawScreen().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythD3D9Painter, and MythPainterVulkan.
Definition at line 53 of file mythpainter.h.
Referenced by MythPainterVulkan::FreeResources(), MythOpenGLPainter::FreeResources(), VideoOutputD3D::Init(), and MythVideoOutputGPU::Init().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Definition at line 54 of file mythpainter.h.
Referenced by MythQtPainter::Begin(), MythD3D9Painter::Begin(), MythOpenGLPainter::Begin(), MythCaptionsOverlay::Draw(), MythMainWindow::Draw(), OSD::Draw(), VideoVisualCircles::DrawPriv(), and VideoVisualSpectrum::DrawPriv().
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, MythPainterVulkan, MythD3D9Painter, and MythQtPainter.
Definition at line 55 of file mythpainter.h.
Referenced by MythCaptionsOverlay::Draw(), MythMainWindow::Draw(), OSD::Draw(), VideoVisualCircles::DrawPriv(), VideoVisualSpectrum::DrawPriv(), MythQtPainter::End(), MythD3D9Painter::End(), and MythOpenGLPainter::End().
|
virtual |
Reimplemented in MythQtPainter.
Definition at line 46 of file mythpainter.cpp.
Referenced by MythMainWindow::Draw(), and MythUIProcedural::DrawSelf().
|
virtual |
Definition at line 50 of file mythpainter.cpp.
|
virtual |
Definition at line 54 of file mythpainter.cpp.
|
pure virtual |
Implemented in MythQtPainter, MythOpenGLPainter, MythPainterVulkan, and MythD3D9Painter.
Referenced by DrawEllipse(), DrawImage(), DrawRect(), DrawRoundRect(), DrawText(), and DrawTextLayout().
void MythPainter::DrawImage | ( | int | x, |
int | y, | ||
MythImage * | im, | ||
int | alpha | ||
) |
Definition at line 58 of file mythpainter.cpp.
void MythPainter::DrawImage | ( | QPoint | topLeft, |
MythImage * | im, | ||
int | alph | ||
) |
Definition at line 71 of file mythpainter.cpp.
|
inlinevirtual |
Reimplemented in MythOpenGLPainter.
Definition at line 65 of file mythpainter.h.
Referenced by MythUIProcedural::DrawSelf().
|
virtual |
Definition at line 76 of file mythpainter.cpp.
|
virtual |
Definition at line 123 of file mythpainter.cpp.
|
virtual |
Reimplemented in MythOpenGLPainter, and MythD3D9Painter.
Definition at line 157 of file mythpainter.cpp.
Referenced by VideoVisualSpectrum::DrawPriv(), MythD3D9Painter::DrawRect(), and MythOpenGLPainter::DrawRect().
|
virtual |
Reimplemented in MythOpenGLPainter.
Definition at line 168 of file mythpainter.cpp.
Referenced by VideoVisualCircles::DrawPriv(), and MythOpenGLPainter::DrawRoundRect().
|
virtual |
Definition at line 180 of file mythpainter.cpp.
|
inlinevirtual |
Definition at line 86 of file mythpainter.h.
|
inlinevirtual |
Reimplemented in MythOpenGLPainter, and MythPainterVulkan.
Definition at line 88 of file mythpainter.h.
MythImage * MythPainter::GetFormatImage | ( | ) |
Returns a blank reference counted image in the format required for the Draw functions for this painter.
Definition at line 525 of file mythpainter.cpp.
Referenced by SubtitleScreen::AddScaledImage(), MythBrowser::Create(), MythBDOverlayScreen::DisplayBDOverlay(), SubtitleScreen::DisplayScaledAVSubtitles(), ZMEvents::eventVisible(), ZMClient::getEventFrame(), ThumbFinder::getFrameImage(), GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), MythImage::Gradient(), MythUIWebBrowser::Init(), MythNotificationScreen::Init(), MythUIThemeCache::LoadCacheImage(), ImageLoader::LoadImage(), TeletextScreen::OptimiseDisplayedArea(), SubtitleScreen::RenderAssTrack(), MythUIVideo::Reset(), WebPage::slotIconChanged(), Player::updateFrame(), MHIContext::UpdateOSD(), and ThumbFinder::updatePositionBar().
void MythPainter::DeleteFormatImage | ( | MythImage * | im | ) |
Definition at line 534 of file mythpainter.cpp.
Referenced by MythImage::~MythImage().
Definition at line 96 of file mythpainter.h.
Referenced by setDebugShowBorders(), and setDebugShowNames().
|
inline |
Definition at line 102 of file mythpainter.h.
Referenced by setDebugShowBorders(), and setDebugShowNames().
|
inline |
Definition at line 103 of file mythpainter.h.
Referenced by setDebugShowBorders(), and setDebugShowNames().
void MythPainter::SetMaximumCacheSizes | ( | int | hardware, |
int | software | ||
) |
Definition at line 592 of file mythpainter.cpp.
Referenced by MythPainterVulkan::Begin(), MythOpenGLPainter::Begin(), and MythPainter().
|
staticprotected |
Definition at line 191 of file mythpainter.cpp.
Referenced by GetImageFromString().
|
staticprotected |
Definition at line 303 of file mythpainter.cpp.
Referenced by GetImageFromRect().
|
protected |
Definition at line 335 of file mythpainter.cpp.
Referenced by DrawText().
|
protected |
Definition at line 368 of file mythpainter.cpp.
Referenced by DrawTextLayout().
|
protected |
Definition at line 457 of file mythpainter.cpp.
Referenced by DrawEllipse(), DrawRect(), and DrawRoundRect().
|
protectedpure virtual |
Creates a reference counted image, call DecrRef() to delete.
Implemented in MythOpenGLPainter, MythD3D9Painter, MythQtPainter, and MythPainterVulkan.
Referenced by GetFormatImage().
|
protectedpure virtual |
Implemented in MythOpenGLPainter, MythPainterVulkan, MythD3D9Painter, and MythQtPainter.
Referenced by DeleteFormatImage().
|
protected |
Definition at line 551 of file mythpainter.cpp.
Referenced by GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), and Teardown().
|
protectedvirtual |
Reimplemented in MythD3D9Painter.
Definition at line 28 of file mythpainter.cpp.
Referenced by MythD3D9Painter::Teardown(), MythOpenGLPainter::~MythOpenGLPainter(), MythPainterVulkan::~MythPainterVulkan(), and MythQtPainter::~MythQtPainter().
|
protected |
Definition at line 541 of file mythpainter.cpp.
Referenced by MythD3D9Painter::GetImageFromCache(), MythPainterVulkan::GetTextureFromCache(), and MythOpenGLPainter::GetTextureFromCache().
|
protected |
Definition at line 134 of file mythpainter.h.
Referenced by MythOpenGLPainter::Begin(), and MythOpenGLPainter::DrawProcedural().
|
protected |
Definition at line 136 of file mythpainter.h.
Referenced by MythD3D9Painter::DeleteBitmaps(), MythOpenGLPainter::DeleteTextures(), MythPainterVulkan::DeleteTextures(), MythD3D9Painter::GetImageFromCache(), MythPainterVulkan::GetTextureFromCache(), and MythOpenGLPainter::GetTextureFromCache().
|
protected |
Definition at line 137 of file mythpainter.h.
Referenced by MythD3D9Painter::GetImageFromCache(), MythPainterVulkan::GetTextureFromCache(), MythOpenGLPainter::GetTextureFromCache(), and SetMaximumCacheSizes().
|
private |
Definition at line 140 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
|
private |
Definition at line 141 of file mythpainter.h.
Referenced by GetImageFromRect(), GetImageFromString(), GetImageFromTextLayout(), and SetMaximumCacheSizes().
|
private |
Definition at line 143 of file mythpainter.h.
Referenced by CheckFormatImage(), DeleteFormatImage(), GetFormatImage(), and Teardown().
|
private |
Definition at line 144 of file mythpainter.h.
Referenced by CheckFormatImage(), DeleteFormatImage(), GetFormatImage(), and Teardown().
|
private |
Definition at line 146 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
|
private |
Definition at line 147 of file mythpainter.h.
Referenced by ExpireImages(), GetImageFromRect(), GetImageFromString(), and GetImageFromTextLayout().
Definition at line 149 of file mythpainter.h.
Definition at line 150 of file mythpainter.h.