~nick-dedekind/qtmir/multiwindow.textures

« back to all changes in this revision

Viewing changes to src/modules/Unity/Application/compositortextureprovider.h

  • Committer: Nick Dedekind
  • Date: 2017-03-28 07:27:53 UTC
  • Revision ID: nick.dedekind@canonical.com-20170328072753-gm93u7iv9cb6f4ng
Compositor texture privates

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
class CompositorTexture
51
51
{
52
52
public:
53
 
    CompositorTexture()
54
 
        : m_currentFrameNumber(0)
55
 
        , m_textureUpdated(false)
56
 
    {
57
 
    }
 
53
    ~CompositorTexture() = default;
58
54
 
59
55
    const QWeakPointer<QSGTexture>& texture() const { return m_texture; }
60
 
    void setTexture(const QWeakPointer<QSGTexture>& texture) {
61
 
        m_texture = texture;
62
 
    }
63
 
 
64
56
    unsigned int currentFrame() const { return m_currentFrameNumber; }
65
 
    void incrementFrame() { m_currentFrameNumber++; }
 
57
    void incrementFrame();
66
58
 
67
59
    bool isUpToDate() const { return m_textureUpdated; }
68
 
    void setUpToDate(bool updated) { m_textureUpdated = updated; }
 
60
    void setUpToDate(bool updated);
 
61
 
 
62
private:
 
63
    CompositorTexture();
 
64
 
 
65
    void setTexture(const QWeakPointer<QSGTexture>& texture);
69
66
 
70
67
private:
71
68
    QWeakPointer<QSGTexture> m_texture;
72
69
    unsigned int m_currentFrameNumber;
73
70
    bool m_textureUpdated;
 
71
 
 
72
    friend class CompositorTextureProvider;
74
73
};
75
74
 
76
75
}