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 // RenderbufferImpl_mock.h: Defines a mock of the RenderbufferImpl class. 8 9 #ifndef LIBANGLE_RENDERER_RENDERBUFFERIMPLMOCK_H_ 10 #define LIBANGLE_RENDERER_RENDERBUFFERIMPLMOCK_H_ 11 12 #include "gmock/gmock.h" 13 14 #include "libANGLE/Image.h" 15 #include "libANGLE/Renderbuffer.h" 16 #include "libANGLE/renderer/RenderbufferImpl.h" 17 18 namespace rx 19 { 20 21 class MockRenderbufferImpl : public RenderbufferImpl 22 { 23 public: MockRenderbufferImpl()24 MockRenderbufferImpl() : RenderbufferImpl(mMockState) {} ~MockRenderbufferImpl()25 virtual ~MockRenderbufferImpl() { destructor(); } 26 MOCK_METHOD4(setStorage, angle::Result(const gl::Context *, GLenum, GLsizei, GLsizei)); 27 MOCK_METHOD6(setStorageMultisample, 28 angle::Result(const gl::Context *, 29 GLsizei, 30 GLenum, 31 GLsizei, 32 GLsizei, 33 gl::MultisamplingMode)); 34 MOCK_METHOD2(setStorageEGLImageTarget, angle::Result(const gl::Context *, egl::Image *)); 35 36 MOCK_METHOD5(getAttachmentRenderTarget, 37 angle::Result(const gl::Context *, 38 GLenum, 39 const gl::ImageIndex &, 40 GLsizei, 41 FramebufferAttachmentRenderTarget **)); 42 43 MOCK_METHOD0(destructor, void()); 44 45 protected: 46 gl::RenderbufferState mMockState; 47 }; 48 49 } // namespace rx 50 51 #endif // LIBANGLE_RENDERER_RENDERBUFFERIMPLMOCK_H_ 52