MythTV  master
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
MythOpenGLPainter Class Reference

#include <mythpainter_ogl.h>

Inheritance diagram for MythOpenGLPainter:
Inheritance graph
[legend]
Collaboration diagram for MythOpenGLPainter:
Collaboration graph
[legend]

Public Member Functions

 MythOpenGLPainter (MythRenderOpenGL *render=nullptr, QWidget *parent=nullptr)
 
 ~MythOpenGLPainter ()
 
void SetTarget (int new_target)
 
void SetSwapControl (bool swap)
 
QString GetName (void) override
 
bool SupportsAnimation (void) override
 
bool SupportsAlpha (void) override
 
bool SupportsClipping (void) override
 
void FreeResources (void) override
 
void Begin (QPaintDevice *parent) override
 
void End () override
 
void DrawImage (const QRect &r, MythImage *im, const QRect &src, int alpha) override
 
void DrawRect (const QRect &area, const QBrush &fillBrush, const QPen &linePen, int alpha) override
 
void DrawRoundRect (const QRect &area, int cornerRadius, const QBrush &fillBrush, const QPen &linePen, int alpha) override
 
void PushTransformation (const UIEffects &fx, QPointF center=QPointF()) override
 
void PopTransformation (void) override
 
void DeleteTextures (void)
 
- Public Member Functions inherited from MythPainter
 MythPainter ()
 
virtual ~MythPainter ()=default
 MythPainter destructor. More...
 
virtual void SetClipRect (const QRect &clipRect)
 
virtual void SetClipRegion (const QRegion &clipRegion)
 
virtual void Clear (QPaintDevice *device, const QRegion &region)
 
QPaintDevice * GetParent (void)
 
void DrawImage (int x, int y, MythImage *im, int alpha)
 
void DrawImage (const QPoint &topLeft, MythImage *im, int alph)
 
virtual void DrawText (const QRect &r, const QString &msg, int flags, const MythFontProperties &font, int alpha, const QRect &boundRect)
 
virtual void DrawTextLayout (const QRect &canvasRect, const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, int alpha, const QRect &destRect)
 
virtual void DrawEllipse (const QRect &area, const QBrush &fillBrush, const QPen &linePen, int alpha)
 
MythImageGetFormatImage ()
 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)
 
bool ShowTypeNames (void)
 
void SetMaximumCacheSizes (int hardware, int software)
 

Protected Member Functions

MythImageGetFormatImagePriv (void) override
 Creates a reference counted image, call DecrRef() to delete. More...
 
void DeleteFormatImagePriv (MythImage *im) override
 
void ClearCache (void)
 
int GetTextureFromCache (MythImage *im)
 
- Protected Member Functions inherited from MythPainter
void DrawTextPriv (MythImage *im, const QString &msg, int flags, const QRect &r, const MythFontProperties &font)
 
void DrawRectPriv (MythImage *im, const QRect &area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen)
 
MythImageGetImageFromString (const QString &msg, int flags, const QRect &r, const MythFontProperties &font)
 
MythImageGetImageFromTextLayout (const LayoutVector &layouts, const FormatVector &formats, const MythFontProperties &font, QRect &canvas, QRect &dest)
 
MythImageGetImageFromRect (const QRect &area, int radius, int ellipse, const QBrush &fillBrush, const QPen &linePen)
 
void ExpireImages (int64_t max=0)
 
virtual void Teardown (void)
 
void CheckFormatImage (MythImage *im)
 

Protected Attributes

QWidget * realParent {nullptr}
 
MythRenderOpenGLrealRender {nullptr}
 
int target {0}
 
bool swapControl {true}
 
QMap< MythImage *, uintm_ImageIntMap
 
std::list< MythImage * > m_ImageExpireList
 
std::list< uintm_textureDeleteList
 
QMutex m_textureDeleteLock
 
- Protected Attributes inherited from MythPainter
QPaintDevice * m_Parent {nullptr}
 
int m_HardwareCacheSize {0}
 
int m_MaxHardwareCacheSize
 

Friends

class VideoOutputOpenGL
 

Detailed Description

Definition at line 14 of file mythpainter_ogl.h.

Constructor & Destructor Documentation

◆ MythOpenGLPainter()

MythOpenGLPainter::MythOpenGLPainter ( MythRenderOpenGL render = nullptr,
QWidget *  parent = nullptr 
)

Definition at line 20 of file mythpainter_ogl.cpp.

◆ ~MythOpenGLPainter()

MythOpenGLPainter::~MythOpenGLPainter ( )

Definition at line 31 of file mythpainter_ogl.cpp.

Member Function Documentation

◆ SetTarget()

void MythOpenGLPainter::SetTarget ( int  new_target)
inline

Definition at line 21 of file mythpainter_ogl.h.

◆ SetSwapControl()

void MythOpenGLPainter::SetSwapControl ( bool  swap)
inline

◆ GetName()

QString MythOpenGLPainter::GetName ( void  )
inlineoverridevirtual

Implements MythPainter.

Definition at line 23 of file mythpainter_ogl.h.

◆ SupportsAnimation()

bool MythOpenGLPainter::SupportsAnimation ( void  )
inlineoverridevirtual

Implements MythPainter.

Definition at line 25 of file mythpainter_ogl.h.

◆ SupportsAlpha()

bool MythOpenGLPainter::SupportsAlpha ( void  )
inlineoverridevirtual

Implements MythPainter.

Definition at line 27 of file mythpainter_ogl.h.

◆ SupportsClipping()

bool MythOpenGLPainter::SupportsClipping ( void  )
inlineoverridevirtual

Implements MythPainter.

Definition at line 29 of file mythpainter_ogl.h.

◆ FreeResources()

void MythOpenGLPainter::FreeResources ( void  )
overridevirtual

Reimplemented from MythPainter.

Definition at line 37 of file mythpainter_ogl.cpp.

Referenced by ~MythOpenGLPainter().

◆ Begin()

void MythOpenGLPainter::Begin ( QPaintDevice *  parent)
overridevirtual

Reimplemented from MythPainter.

Definition at line 74 of file mythpainter_ogl.cpp.

◆ End()

void MythOpenGLPainter::End ( void  )
overridevirtual

Reimplemented from MythPainter.

Definition at line 117 of file mythpainter_ogl.cpp.

◆ DrawImage()

void MythOpenGLPainter::DrawImage ( const QRect &  r,
MythImage im,
const QRect &  src,
int  alpha 
)
overridevirtual

Implements MythPainter.

Definition at line 202 of file mythpainter_ogl.cpp.

◆ DrawRect()

void MythOpenGLPainter::DrawRect ( const QRect &  area,
const QBrush &  fillBrush,
const QPen &  linePen,
int  alpha 
)
overridevirtual

Reimplemented from MythPainter.

Definition at line 210 of file mythpainter_ogl.cpp.

◆ DrawRoundRect()

void MythOpenGLPainter::DrawRoundRect ( const QRect &  area,
int  cornerRadius,
const QBrush &  fillBrush,
const QPen &  linePen,
int  alpha 
)
overridevirtual

Reimplemented from MythPainter.

Definition at line 222 of file mythpainter_ogl.cpp.

◆ PushTransformation()

void MythOpenGLPainter::PushTransformation ( const UIEffects fx,
QPointF  center = QPointF() 
)
overridevirtual

Reimplemented from MythPainter.

Definition at line 250 of file mythpainter_ogl.cpp.

◆ PopTransformation()

void MythOpenGLPainter::PopTransformation ( void  )
overridevirtual

Reimplemented from MythPainter.

Definition at line 256 of file mythpainter_ogl.cpp.

◆ DeleteTextures()

void MythOpenGLPainter::DeleteTextures ( void  )

Definition at line 43 of file mythpainter_ogl.cpp.

Referenced by Begin(), FreeResources(), and GetTextureFromCache().

◆ GetFormatImagePriv()

MythImage* MythOpenGLPainter::GetFormatImagePriv ( void  )
inlineoverrideprotectedvirtual

Creates a reference counted image, call DecrRef() to delete.

Implements MythPainter.

Definition at line 48 of file mythpainter_ogl.h.

◆ DeleteFormatImagePriv()

void MythOpenGLPainter::DeleteFormatImagePriv ( MythImage im)
overrideprotectedvirtual

Implements MythPainter.

Definition at line 239 of file mythpainter_ogl.cpp.

Referenced by GetTextureFromCache().

◆ ClearCache()

void MythOpenGLPainter::ClearCache ( void  )
protected

Definition at line 59 of file mythpainter_ogl.cpp.

Referenced by FreeResources().

◆ GetTextureFromCache()

int MythOpenGLPainter::GetTextureFromCache ( MythImage im)
protected

Definition at line 133 of file mythpainter_ogl.cpp.

Referenced by DrawImage().

Friends And Related Function Documentation

◆ VideoOutputOpenGL

friend class VideoOutputOpenGL
friend

Definition at line 16 of file mythpainter_ogl.h.

Member Data Documentation

◆ realParent

QWidget* MythOpenGLPainter::realParent {nullptr}
protected

Definition at line 55 of file mythpainter_ogl.h.

Referenced by Begin(), and MythOpenGLPainter().

◆ realRender

MythRenderOpenGL* MythOpenGLPainter::realRender {nullptr}
protected

◆ target

int MythOpenGLPainter::target {0}
protected

◆ swapControl

bool MythOpenGLPainter::swapControl {true}
protected

Definition at line 58 of file mythpainter_ogl.h.

Referenced by Begin(), and End().

◆ m_ImageIntMap

QMap<MythImage *, uint> MythOpenGLPainter::m_ImageIntMap
protected

Definition at line 60 of file mythpainter_ogl.h.

Referenced by ClearCache(), DeleteFormatImagePriv(), and GetTextureFromCache().

◆ m_ImageExpireList

std::list<MythImage *> MythOpenGLPainter::m_ImageExpireList
protected

Definition at line 61 of file mythpainter_ogl.h.

Referenced by ClearCache(), DeleteFormatImagePriv(), and GetTextureFromCache().

◆ m_textureDeleteList

std::list<uint> MythOpenGLPainter::m_textureDeleteList
protected

Definition at line 62 of file mythpainter_ogl.h.

Referenced by ClearCache(), DeleteFormatImagePriv(), and DeleteTextures().

◆ m_textureDeleteLock

QMutex MythOpenGLPainter::m_textureDeleteLock
protected

Definition at line 63 of file mythpainter_ogl.h.

Referenced by ClearCache(), DeleteFormatImagePriv(), and DeleteTextures().


The documentation for this class was generated from the following files: