~alan-griffiths/mir/keep-helgrind-happy

« back to all changes in this revision

Viewing changes to src/server/compositor/gl_renderer.h

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2014-02-14 16:07:51 UTC
  • mfrom: (1389.6.7 renderer-set-viewport)
  • Revision ID: tarmac-20140214160751-oy8sz9x1tds0ftpo
Move Renderer viewport setup out of the constructor and into a separate
function, where it can be changed without having to reconstruct the whole
Renderer.

This will be useful in future in cases such as:
  * Non-destructive display config changes that will avoid reconstructing
    DisplayBuffers (and compositors, and renderers :)
  * Viewport dimensions morphing during a screen rotation animation.
.

Approved by Alexandros Frantzis, PS Jenkins bot, Daniel van Vugt, Kevin DuBois, Alan Griffiths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    virtual ~GLRenderer() noexcept;
38
38
 
39
39
    // These are called with a valid GL context:
 
40
    void set_viewport(geometry::Rectangle const& rect);
40
41
    void begin(float rotation) const override;
41
42
    void render(CompositingCriteria const& info, graphics::Buffer& buffer) const override;
42
43
    void end() const override;
55
56
    GLuint alpha_uniform_loc;
56
57
    GLuint vertex_attribs_vbo;
57
58
 
 
59
    geometry::Rectangle viewport;
 
60
 
58
61
    typedef CompositingCriteria const* SurfaceID;
59
62
    struct Texture
60
63
    {