|
MythTV master
|
#include <libmythui/opengl/mythpainteropengl.h>
Public Member Functions | |
| MythOpenGLPainter (MythRenderOpenGL *Render, MythMainWindow *Parent) | |
| ~MythOpenGLPainter () override | |
| void | DeleteTextures (void) |
| 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 (QRect Dest, MythImage *Image, QRect Source, int Alpha) override |
| void | DrawProcedural (QRect Dest, int Alpha, const ProcSource &VertexSource, const ProcSource &FragmentSource, const QString &SourceHash) override |
| void | DrawRect (QRect Area, const QBrush &FillBrush, const QPen &LinePen, int Alpha) override |
| Draw a rectangle. More... | |
| void | DrawRoundRect (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 |
Public Member Functions inherited from MythPainterGPU | |
| MythPainterGPU (MythMainWindow *Parent) | |
| ~MythPainterGPU () override=default | |
| void | SetViewControl (ViewControls Control) |
Public Member Functions inherited from MythPainter | |
| 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 (const UIEffects &zoom, 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 | |
| void | ClearCache (void) |
| MythGLTexture * | GetTextureFromCache (MythImage *Image) |
| QOpenGLShaderProgram * | GetProceduralShader (const ProcSource &VertexSource, const ProcSource &FragmentSource, const QString &SourceHash) |
| MythImage * | GetFormatImagePriv (void) override |
| Creates a reference counted image, call DecrRef() to delete. More... | |
| void | DeleteFormatImagePriv (MythImage *Image) override |
Protected Member Functions inherited from MythPainter | |
| 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) |
Protected Attributes | |
| MythRenderOpenGL * | m_render { nullptr } |
| QRecursiveMutex | m_imageAndTextureLock |
| QMap< MythImage *, MythGLTexture * > | m_imageToTextureMap |
| std::list< MythImage * > | m_imageExpireList |
| std::list< MythGLTexture * > | m_textureDeleteList |
| QVector< MythGLTexture * > | m_mappedTextures |
| std::array< QOpenGLBuffer *, MAX_BUFFER_POOL > | m_mappedBufferPool { nullptr } |
| size_t | m_mappedBufferPoolIdx { 0 } |
| bool | m_mappedBufferPoolReady { false } |
| QHash< QString, QOpenGLShaderProgram * > | m_procedurals |
Protected Attributes inherited from MythPainterGPU | |
| MythMainWindow * | m_parent { nullptr } |
| ViewControls | m_viewControl { Viewport | Framebuffer } |
| qreal | m_pixelRatio { 1.0 } |
| bool | m_usingHighDPI { false } |
| QSize | m_lastSize |
Protected Attributes inherited from MythPainter | |
| float | m_frameTime { 0 } |
| int | m_hardwareCacheSize { 0 } |
| int | m_maxHardwareCacheSize { 0 } |
Additional Inherited Members | |
Public Types inherited from MythPainterGPU | |
| enum | ViewControl : std::uint8_t { None = 0x00 , Viewport = 0x01 , Framebuffer = 0x02 } |
Public Slots inherited from MythPainterGPU | |
| void | CurrentDPIChanged (qreal DPI) |
Static Protected Member Functions inherited from MythPainter | |
| 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) |
Definition at line 26 of file mythpainteropengl.h.
| MythOpenGLPainter::MythOpenGLPainter | ( | MythRenderOpenGL * | Render, |
| MythMainWindow * | Parent | ||
| ) |
Definition at line 15 of file mythpainteropengl.cpp.
|
override |
Definition at line 26 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 92 of file mythpainteropengl.cpp.
|
protected |
Definition at line 77 of file mythpainteropengl.cpp.
Referenced by FreeResources().
|
overrideprotectedvirtual |
Implements MythPainter.
Definition at line 336 of file mythpainteropengl.cpp.
Referenced by GetTextureFromCache().
| void MythOpenGLPainter::DeleteTextures | ( | void | ) |
Definition at line 61 of file mythpainteropengl.cpp.
Referenced by Begin(), FreeResources(), and GetTextureFromCache().
|
overridevirtual |
Implements MythPainter.
Definition at line 242 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 281 of file mythpainteropengl.cpp.
|
overridevirtual |
Draw a rectangle.
If it is a simple rectangle, then use our own shaders for rendering (which saves texture memory but may not be as accurate as Qt rendering) otherwise fallback to Qt painting to a QImage, which is uploaded as a texture.
Reimplemented from MythPainter.
Definition at line 310 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 322 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 152 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 41 of file mythpainteropengl.cpp.
Referenced by ~MythOpenGLPainter().
|
inlineoverrideprotectedvirtual |
Creates a reference counted image, call DecrRef() to delete.
Implements MythPainter.
Definition at line 58 of file mythpainteropengl.h.
|
inlineoverridevirtual |
Implements MythPainter.
Definition at line 36 of file mythpainteropengl.h.
|
protected |
Definition at line 287 of file mythpainteropengl.cpp.
Referenced by DrawProcedural().
|
protected |
Definition at line 174 of file mythpainteropengl.cpp.
Referenced by DrawImage().
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 353 of file mythpainteropengl.cpp.
|
overridevirtual |
Reimplemented from MythPainter.
Definition at line 347 of file mythpainteropengl.cpp.
|
inlineoverridevirtual |
Implements MythPainter.
Definition at line 38 of file mythpainteropengl.h.
|
inlineoverridevirtual |
Implements MythPainter.
Definition at line 37 of file mythpainteropengl.h.
|
inlineoverridevirtual |
Implements MythPainter.
Definition at line 39 of file mythpainteropengl.h.
|
protected |
Definition at line 64 of file mythpainteropengl.h.
Referenced by ClearCache(), DeleteFormatImagePriv(), DeleteTextures(), and GetTextureFromCache().
|
protected |
Definition at line 66 of file mythpainteropengl.h.
Referenced by ClearCache(), DeleteFormatImagePriv(), and GetTextureFromCache().
|
protected |
Definition at line 65 of file mythpainteropengl.h.
Referenced by ClearCache(), DeleteFormatImagePriv(), and GetTextureFromCache().
|
protected |
Definition at line 70 of file mythpainteropengl.h.
Referenced by Begin(), DrawImage(), and FreeResources().
|
protected |
Definition at line 71 of file mythpainteropengl.h.
Referenced by DrawImage().
Definition at line 72 of file mythpainteropengl.h.
Referenced by Begin(), and FreeResources().
|
protected |
Definition at line 69 of file mythpainteropengl.h.
Referenced by DrawImage(), End(), and MythOpenGLPainter().
|
protected |
Definition at line 74 of file mythpainteropengl.h.
Referenced by FreeResources(), and GetProceduralShader().
|
protected |
Definition at line 62 of file mythpainteropengl.h.
Referenced by Begin(), DeleteTextures(), DrawImage(), DrawProcedural(), DrawRect(), DrawRoundRect(), End(), FreeResources(), GetProceduralShader(), GetTextureFromCache(), MythOpenGLPainter(), PopTransformation(), PushTransformation(), and ~MythOpenGLPainter().
|
protected |
Definition at line 67 of file mythpainteropengl.h.
Referenced by ClearCache(), DeleteFormatImagePriv(), and DeleteTextures().