~kdub/mir/fix-1301040

« back to all changes in this revision

Viewing changes to include/test/mir_test_doubles/mock_renderable.h

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2014-04-01 19:44:01 UTC
  • mfrom: (1492.3.6 filter-parameters)
  • Revision ID: tarmac-20140401194401-lrq8wviv7i45v661
compositor: now that we have a filtered list of renderables we want to draw, directly access the information needed to implement a frig instead of burdening the RenderingOperator to provide it. Fixes: https://bugs.launchpad.net/bugs/1298596.

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
            .WillByDefault(testing::Return(geometry::Rectangle{{},{}}));
38
38
        ON_CALL(*this, buffer(testing::_))
39
39
            .WillByDefault(testing::Return(std::make_shared<StubBuffer>()));
 
40
        ON_CALL(*this, buffers_ready_for_compositor())
 
41
            .WillByDefault(testing::Return(1));
 
42
        ON_CALL(*this, alpha())
 
43
            .WillByDefault(testing::Return(1.0f));
 
44
        ON_CALL(*this, transformation())
 
45
            .WillByDefault(testing::Return(glm::mat4{}));
 
46
        ON_CALL(*this, should_be_rendered_in(testing::_))
 
47
            .WillByDefault(testing::Return(true));
40
48
    }
 
49
 
41
50
    MOCK_CONST_METHOD1(buffer, std::shared_ptr<graphics::Buffer>(void const*));
42
51
    MOCK_CONST_METHOD0(alpha_enabled, bool());
43
52
    MOCK_CONST_METHOD0(screen_position, geometry::Rectangle());
45
54
    MOCK_CONST_METHOD0(transformation, glm::mat4());
46
55
    MOCK_CONST_METHOD1(should_be_rendered_in, bool(geometry::Rectangle const& rect));
47
56
    MOCK_CONST_METHOD0(shaped, bool());
48
 
    int buffers_ready_for_compositor() const override { return 1; }
 
57
    MOCK_CONST_METHOD0(buffers_ready_for_compositor, int());
49
58
};
50
59
}
51
60
}