1 //
2 // Copyright 2015 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // TransformFeedbackImpl_mock.h: Defines a mock of the TransformFeedbackImpl class.
8 
9 #ifndef LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPLMOCK_H_
10 #define LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPLMOCK_H_
11 
12 #include "gmock/gmock.h"
13 
14 #include "libANGLE/renderer/TransformFeedbackImpl.h"
15 
16 namespace rx
17 {
18 
19 class MockTransformFeedbackImpl : public TransformFeedbackImpl
20 {
21   public:
MockTransformFeedbackImpl(const gl::TransformFeedbackState & state)22     MockTransformFeedbackImpl(const gl::TransformFeedbackState &state)
23         : TransformFeedbackImpl(state)
24     {}
~MockTransformFeedbackImpl()25     ~MockTransformFeedbackImpl() { destructor(); }
26 
27     MOCK_METHOD2(begin, angle::Result(const gl::Context *, gl::PrimitiveMode));
28     MOCK_METHOD1(end, angle::Result(const gl::Context *));
29     MOCK_METHOD1(pause, angle::Result(const gl::Context *));
30     MOCK_METHOD1(resume, angle::Result(const gl::Context *));
31 
32     MOCK_METHOD3(bindIndexedBuffer,
33                  angle::Result(const gl::Context *,
34                                size_t,
35                                const gl::OffsetBindingPointer<gl::Buffer> &));
36 
37     MOCK_METHOD0(destructor, void());
38 };
39 }  // namespace rx
40 
41 #endif  // LIBANGLE_RENDERER_TRANSFORMFEEDBACKIMPLMOCK_H_
42