Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h

Issue 11428140: gpu: Add async pixel transfer interface, stub and tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Fix lint. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
6 #define UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
7
8 #include "base/basictypes.h"
9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "ui/gl/async_pixel_transfer_delegate.h"
11
12 namespace gfx {
13
14 class MockAsyncPixelTransferState : public gfx::AsyncPixelTransferState {
15 public:
16 MockAsyncPixelTransferState();
17 MOCK_METHOD0(TransferIsInProgress, bool());
18 MOCK_METHOD1(BindAsyncTransferToTexture, bool(GLenum target));
19
20 protected:
21 virtual ~MockAsyncPixelTransferState();
22 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferState);
23 };
24
25 class MockAsyncPixelTransferDelegate : public gfx::AsyncPixelTransferDelegate {
26 public:
27 MockAsyncPixelTransferDelegate();
28 virtual ~MockAsyncPixelTransferDelegate();
29
30 MOCK_METHOD1(CreatePixelTransferState,
31 scoped_refptr<gfx::AsyncPixelTransferState>(GLuint service_id));
32
33 MOCK_METHOD1(AsyncNotifyCompletion,
34 void(const base::Closure& task));
35
36 MOCK_METHOD3(AsyncTexImage2D,
37 void(gfx::AsyncPixelTransferState*,
38 AsyncTexImage2DParams tex_params,
39 AsyncMemoryParams mem_params));
40
41 MOCK_METHOD3(AsyncTexSubImage2D,
42 void(gfx::AsyncPixelTransferState*,
43 AsyncTexSubImage2DParams tex_params,
44 AsyncMemoryParams mem_params));
45
46 private:
47 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate);
48 };
49
50 } // namespace gfx
51
52 #endif // UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
53
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698