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

Side by Side Diff: gpu/command_buffer/client/client_test_helper.h

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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
« no previous file with comments | « cc/test/fake_tile_manager.cc ('k') | gpu/command_buffer/client/client_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Helper classes for implementing gpu client side unit tests. 5 // Helper classes for implementing gpu client side unit tests.
6 6
7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "gpu/command_buffer/common/cmd_buffer_common.h" 11 #include "gpu/command_buffer/common/cmd_buffer_common.h"
12 #include "gpu/command_buffer/common/command_buffer.h" 12 #include "gpu/command_buffer/common/command_buffer.h"
13 #include "gpu/command_buffer/common/compiler_specific.h" 13 #include "gpu/command_buffer/common/compiler_specific.h"
14 #include "gpu/command_buffer/common/gpu_control.h"
14 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
16 17
17 namespace gpu { 18 namespace gpu {
18 19
19 class CommandBufferHelper; 20 class CommandBufferHelper;
20 21
21 class MockCommandBufferBase : public CommandBuffer { 22 class MockCommandBufferBase : public CommandBuffer {
22 public: 23 public:
23 static const int32 kTransferBufferBaseId = 0x123; 24 static const int32 kTransferBufferBaseId = 0x123;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 class MockClientCommandBufferMockFlush : public MockClientCommandBuffer { 75 class MockClientCommandBufferMockFlush : public MockClientCommandBuffer {
75 public: 76 public:
76 MockClientCommandBufferMockFlush(); 77 MockClientCommandBufferMockFlush();
77 virtual ~MockClientCommandBufferMockFlush(); 78 virtual ~MockClientCommandBufferMockFlush();
78 79
79 MOCK_METHOD1(Flush, void(int32 put_offset)); 80 MOCK_METHOD1(Flush, void(int32 put_offset));
80 81
81 void DelegateToFake(); 82 void DelegateToFake();
82 }; 83 };
83 84
85 class MockClientGpuControl : public GpuControl {
86 public:
87 MockClientGpuControl();
88 virtual ~MockClientGpuControl();
89
90 MOCK_METHOD4(CreateGpuMemoryBuffer,
91 gfx::GpuMemoryBuffer*(size_t width,
92 size_t height,
93 unsigned internalformat,
94 int32* id));
95 MOCK_METHOD1(DestroyGpuMemoryBuffer, void(int32 id));
96
97 private:
98 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl);
99 };
100
84 } // namespace gpu 101 } // namespace gpu
85 102
86 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 103 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
87 104
OLDNEW
« no previous file with comments | « cc/test/fake_tile_manager.cc ('k') | gpu/command_buffer/client/client_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698