| Index: gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
|
| diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h b/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..86cd7f2183d7cfe1d596fa8fa339bb201f125e29
|
| --- /dev/null
|
| +++ b/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
|
| +#define UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "testing/gmock/include/gmock/gmock.h"
|
| +#include "ui/gl/async_pixel_transfer_delegate.h"
|
| +
|
| +namespace gfx {
|
| +
|
| +class MockAsyncPixelTransferState : public gfx::AsyncPixelTransferState {
|
| + public:
|
| + MockAsyncPixelTransferState();
|
| +
|
| + // Implement AsyncPixelTransferState.
|
| + MOCK_METHOD0(TransferIsInProgress, bool());
|
| + MOCK_METHOD2(BindTransfer,
|
| + bool(GLenum target, AsyncTexImage2DParams* level_params));
|
| +
|
| + protected:
|
| + virtual ~MockAsyncPixelTransferState();
|
| + DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferState);
|
| +};
|
| +
|
| +class MockAsyncPixelTransferDelegate : public gfx::AsyncPixelTransferDelegate {
|
| + public:
|
| + MockAsyncPixelTransferDelegate();
|
| + virtual ~MockAsyncPixelTransferDelegate();
|
| +
|
| + // Implement AsyncPixelTransferDelegate.
|
| + MOCK_METHOD1(CreatePixelTransferState,
|
| + scoped_refptr<gfx::AsyncPixelTransferState>(GLuint service_id));
|
| + MOCK_METHOD1(AsyncNotifyCompletion,
|
| + void(const base::Closure& task));
|
| + MOCK_METHOD3(AsyncTexImage2D,
|
| + void(gfx::AsyncPixelTransferState*,
|
| + const AsyncTexImage2DParams& tex_params,
|
| + const AsyncMemoryParams& mem_params));
|
| + MOCK_METHOD3(AsyncTexSubImage2D,
|
| + void(gfx::AsyncPixelTransferState*,
|
| + const AsyncTexSubImage2DParams& tex_params,
|
| + const AsyncMemoryParams& mem_params));
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate);
|
| +};
|
| +
|
| +} // namespace gfx
|
| +
|
| +#endif // UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
|
| +
|
|
|