Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Followup on [9b23866]. Use reference counting in MythD3D9Painter.

  • Loading branch information...
commit a9b46b72677b8a3ee97767b2311e2749009a2498 1 parent c5803f1
@daniel-kristjansson daniel-kristjansson authored
View
9 mythtv/libs/libmythui/mythpainter_d3d9.cpp
@@ -12,11 +12,11 @@
#define LOC QString("D3D9 Painter: ")
MythD3D9Painter::MythD3D9Painter(MythRenderD3D9 *render) :
- MythPainter(), m_render(render), m_created_render(true), m_target(NULL),
+ MythPainter(), m_render(render), m_target(NULL),
m_swap_control(true)
{
if (m_render)
- m_created_render = false;
+ m_render->IncrRef();
}
MythD3D9Painter::~MythD3D9Painter()
@@ -37,7 +37,6 @@ bool MythD3D9Painter::InitD3D9(QPaintDevice *parent)
if (!m_render)
return false;
- m_created_render = true;
if (m_render->Create(real_parent->size(), real_parent->winId()))
return true;
@@ -57,9 +56,7 @@ void MythD3D9Painter::Teardown(void)
if (m_render)
{
- if (m_created_render)
- delete m_render;
- m_created_render = true;
+ m_render->DecrRef();
m_render = NULL;
}
}
View
1  mythtv/libs/libmythui/mythpainter_d3d9.h
@@ -41,7 +41,6 @@ class MUI_PUBLIC MythD3D9Painter : public MythPainter
D3D9Image* GetImageFromCache(MythImage *im);
MythRenderD3D9 *m_render;
- bool m_created_render;
D3D9Image *m_target;
bool m_swap_control;
QMap<MythImage *, D3D9Image*> m_ImageBitmapMap;
Please sign in to comment.
Something went wrong with that request. Please try again.