Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mock_buffer_stream.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_MOCK_BUFFER_STREAM_H_
20 #define MIR_TEST_DOUBLES_MOCK_BUFFER_STREAM_H_
21 
23 
24 #include <gmock/gmock.h>
25 
26 namespace mir
27 {
28 namespace test
29 {
30 namespace doubles
31 {
33 {
34  MOCK_METHOD2(swap_client_buffers, void(graphics::Buffer*, std::function<void(graphics::Buffer*)> completee));
36  std::shared_ptr<graphics::Buffer>(void const*));
37  MOCK_METHOD0(lock_snapshot_buffer, std::shared_ptr<graphics::Buffer>());
38 
41  MOCK_METHOD1(resize, void(geometry::Size const&));
42  MOCK_METHOD0(force_client_completion, void());
43  MOCK_METHOD1(allow_framedropping, void(bool));
45  int buffers_ready_for_compositor() const override { return 1; }
46 };
47 }
48 }
49 }
50 
51 #endif /* MIR_TEST_DOUBLES_MOCK_BUFFER_STREAM_H_ */
Definition: size.h:30
Definition: buffer_stream.h:39
MOCK_METHOD1(lock_compositor_buffer, std::shared_ptr< graphics::Buffer >(void const *))
virtual MirPixelFormat get_stream_pixel_format()=0
virtual void resize(geometry::Size const &size)=0
int buffers_ready_for_compositor() const override
Definition: mock_buffer_stream.h:45
virtual void allow_framedropping(bool)=0
virtual std::shared_ptr< graphics::Buffer > lock_compositor_buffer(void const *user_id)=0
MOCK_METHOD0(lock_snapshot_buffer, std::shared_ptr< graphics::Buffer >())
virtual void force_requests_to_complete()=0
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:99
virtual void swap_client_buffers(graphics::Buffer *old_buffer, std::function< void(graphics::Buffer *new_buffer)> complete)=0
virtual std::shared_ptr< graphics::Buffer > lock_snapshot_buffer()=0
MOCK_METHOD2(swap_client_buffers, void(graphics::Buffer *, std::function< void(graphics::Buffer *)> completee))
Definition: buffer.h:34
Definition: mock_buffer_stream.h:32
virtual geometry::Size stream_size()=0

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