Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mock_display_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alexandros Frantzis <alexandros.frantzis@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_MOCK_DISPLAY_BUFFER_H_
20 #define MIR_TEST_DOUBLES_MOCK_DISPLAY_BUFFER_H_
21 
23 
24 #include <gmock/gmock.h>
25 
26 namespace mir
27 {
28 namespace test
29 {
30 namespace doubles
31 {
32 
34 {
35 public:
37  {
38  using namespace testing;
39  ON_CALL(*this, can_bypass())
40  .WillByDefault(Return(false));
41  ON_CALL(*this, view_area())
42  .WillByDefault(Return(geometry::Rectangle{{0,0},{0,0}}));
43  }
45  MOCK_METHOD0(make_current, void());
47  MOCK_METHOD0(post_update, void());
50  std::function<void(graphics::Renderable const&)> const&));
52 };
53 
54 }
55 }
56 }
57 
58 #endif /* MIR_TEST_DOUBLES_MOCK_DISPLAY_BUFFER_H_ */
virtual void release_current()=0
Releases the current GL rendering target.
MockDisplayBuffer()
Definition: mock_display_buffer.h:36
Interface to an output framebuffer.
Definition: display_buffer.h:39
MOCK_METHOD0(make_current, void())
virtual void render_and_post_update(RenderableList const &renderlist, std::function< void(Renderable const &)> const &render_fn)=0
This will render renderlist to the screen and post the result to the screen.
MirOrientation
Definition: common.h:113
MOCK_METHOD2(render_and_post_update, void(graphics::RenderableList const &, std::function< void(graphics::Renderable const &)> const &))
std::list< std::shared_ptr< Renderable > > RenderableList
Definition: renderable.h:88
Definition: renderable.h:33
virtual bool can_bypass() const =0
to be deprecated
virtual void post_update()=0
This will trigger OpenGL rendering and post the result to the screen.
virtual geometry::Rectangle view_area() const =0
The area the DisplayBuffer occupies in the virtual screen space.
Definition: rectangle.h:33
MOCK_CONST_METHOD0(view_area, geometry::Rectangle())
virtual void make_current()=0
Makes the DisplayBuffer the current GL rendering target.
Definition: mock_display_buffer.h:33
virtual MirOrientation orientation() const =0
Returns the orientation of the display buffer relative to how the user should see it (the orientation...

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014