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

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

Issue 16175005: GPU: Replace AsyncPixelTransferState with AsyncPixelTransferDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h" 9 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 11
12 namespace gpu { 12 namespace gpu {
13 13
14 class MockAsyncPixelTransferState : public AsyncPixelTransferState {
15 public:
16 MockAsyncPixelTransferState();
17
18 // Called in ~MockAsyncPixelTransferState.
19 MOCK_METHOD0(Destroy, void());
20
21 // Implement AsyncPixelTransferState.
22 MOCK_METHOD0(TransferIsInProgress, bool());
23 MOCK_METHOD1(BindTransfer, void(AsyncTexImage2DParams* level_params));
24
25 protected:
26 virtual ~MockAsyncPixelTransferState();
27 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferState);
28 };
29
30 class MockAsyncPixelTransferDelegate : public AsyncPixelTransferDelegate { 14 class MockAsyncPixelTransferDelegate : public AsyncPixelTransferDelegate {
31 public: 15 public:
32 MockAsyncPixelTransferDelegate(); 16 MockAsyncPixelTransferDelegate();
33 virtual ~MockAsyncPixelTransferDelegate(); 17 virtual ~MockAsyncPixelTransferDelegate();
34 18
19 // Called in ~MockAsyncPixelTransferDelegate.
20 MOCK_METHOD0(Destroy, void());
21
35 // Implement AsyncPixelTransferDelegate. 22 // Implement AsyncPixelTransferDelegate.
36 MOCK_METHOD2(CreatePixelTransferState, 23 MOCK_METHOD3(AsyncTexImage2D,
37 AsyncPixelTransferState*( 24 void(const AsyncTexImage2DParams& tex_params,
38 GLuint service_id, const AsyncTexImage2DParams& define_params)); 25 const AsyncMemoryParams& mem_params,
39 MOCK_METHOD4(AsyncTexImage2D, 26 const base::Closure& bind_callback));
40 void(AsyncPixelTransferState*, 27 MOCK_METHOD2(AsyncTexSubImage2D,
41 const AsyncTexImage2DParams& tex_params, 28 void(const AsyncTexSubImage2DParams& tex_params,
42 const AsyncMemoryParams& mem_params, 29 const AsyncMemoryParams& mem_params));
43 const base::Closure& bind_callback)); 30 MOCK_METHOD0(TransferIsInProgress, bool());
44 MOCK_METHOD3(AsyncTexSubImage2D, 31 MOCK_METHOD0(WaitForTransferCompletion, void());
45 void(AsyncPixelTransferState*,
46 const AsyncTexSubImage2DParams& tex_params,
47 const AsyncMemoryParams& mem_params));
48 MOCK_METHOD1(WaitForTransferCompletion, void(AsyncPixelTransferState*));
49 32
50 private: 33 private:
51 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate); 34 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate);
52 }; 35 };
53 36
54 } // namespace gpu 37 } // namespace gpu
55 38
56 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK 39 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_MOCK
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698