diff options
Diffstat (limited to 'src/adaptationlayers/adaptationinterfaces.cpp')
-rw-r--r-- | src/adaptationlayers/adaptationinterfaces.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/adaptationlayers/adaptationinterfaces.cpp b/src/adaptationlayers/adaptationinterfaces.cpp index 024bc3c..2632f70 100644 --- a/src/adaptationlayers/adaptationinterfaces.cpp +++ b/src/adaptationlayers/adaptationinterfaces.cpp @@ -48,22 +48,17 @@ TextureReference::TextureReference() : m_status(Null) , m_texture_id(0) + , m_sub_rect(0, 0, 1, 1) , m_has_alpha(false) + , m_owns_texture(false) { } - -/*! - Constructs a new texture reference with texture set to - \a textureId and status set to Ready. \a textureRect specifies which - part of the texture to source from. \a hasAlpha indicates wether the - texture contains an alpha channel or not. - */ -TextureReference::TextureReference(int textureId, const QRectF &textureRect, bool hasAlpha) - : m_status(Ready) - , m_texture_id(textureId) - , m_texture_rect(textureRect) - , m_has_alpha(hasAlpha) +void TextureReference::setStatus(Status s) { -} + m_status = s; + + Q_ASSERT(s != Ready || (m_texture_id > 0 && !m_texture_size.isEmpty())); + emit statusChanged(s); +} |