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

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: Fix Asan bot. 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
18 // Implement AsyncPixelTransferState.
19 MOCK_METHOD0(TransferIsInProgress, bool());
20 MOCK_METHOD2(BindTransfer,
21 bool(GLenum target, AsyncTexImage2DParams* level_params));
22
23 protected:
24 virtual ~MockAsyncPixelTransferState();
25 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferState);
26 };
27
28 class MockAsyncPixelTransferDelegate : public gfx::AsyncPixelTransferDelegate {
29 public:
30 MockAsyncPixelTransferDelegate();
31 virtual ~MockAsyncPixelTransferDelegate();
32
33 // Implement AsyncPixelTransferDelegate.
34 MOCK_METHOD1(CreatePixelTransferState,
35 scoped_refptr<gfx::AsyncPixelTransferState>(GLuint service_id));
36 MOCK_METHOD1(AsyncNotifyCompletion,
37 void(const base::Closure& task));
38 MOCK_METHOD3(AsyncTexImage2D,
39 void(gfx::AsyncPixelTransferState*,
40 const AsyncTexImage2DParams& tex_params,
41 const AsyncMemoryParams& mem_params));
42 MOCK_METHOD3(AsyncTexSubImage2D,
43 void(gfx::AsyncPixelTransferState*,
44 const AsyncTexSubImage2DParams& tex_params,
45 const AsyncMemoryParams& mem_params));
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate);
49 };
50
51 } // namespace gfx
52
53 #endif // UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
54
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698