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

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

Issue 24925002: Move Insert/SignalSyncPoint() to GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase past r226145 Created 7 years, 2 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 // 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"
(...skipping 21 matching lines...) Expand all
32 virtual State GetLastState() OVERRIDE; 32 virtual State GetLastState() OVERRIDE;
33 virtual int32 GetLastToken() OVERRIDE; 33 virtual int32 GetLastToken() OVERRIDE;
34 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE; 34 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE;
35 virtual void SetGetBuffer(int transfer_buffer_id) OVERRIDE; 35 virtual void SetGetBuffer(int transfer_buffer_id) OVERRIDE;
36 virtual void SetGetOffset(int32 get_offset) OVERRIDE; 36 virtual void SetGetOffset(int32 get_offset) OVERRIDE;
37 virtual Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE; 37 virtual Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE;
38 virtual Buffer GetTransferBuffer(int32 id) OVERRIDE; 38 virtual Buffer GetTransferBuffer(int32 id) OVERRIDE;
39 virtual void SetToken(int32 token) OVERRIDE; 39 virtual void SetToken(int32 token) OVERRIDE;
40 virtual void SetParseError(error::Error error) OVERRIDE; 40 virtual void SetParseError(error::Error error) OVERRIDE;
41 virtual void SetContextLostReason(error::ContextLostReason reason) OVERRIDE; 41 virtual void SetContextLostReason(error::ContextLostReason reason) OVERRIDE;
42 virtual uint32 InsertSyncPoint() OVERRIDE;
43 42
44 // Get's the Id of the next transfer buffer that will be returned 43 // Get's the Id of the next transfer buffer that will be returned
45 // by CreateTransferBuffer. This is useful for testing expected ids. 44 // by CreateTransferBuffer. This is useful for testing expected ids.
46 int32 GetNextFreeTransferBufferId(); 45 int32 GetNextFreeTransferBufferId();
47 46
48 void FlushHelper(int32 put_offset); 47 void FlushHelper(int32 put_offset);
49 void DestroyTransferBufferHelper(int32 id); 48 void DestroyTransferBufferHelper(int32 id);
50 49
51 virtual void OnFlush() = 0; 50 virtual void OnFlush() = 0;
52 51
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 88
90 MOCK_METHOD0(SupportsGpuMemoryBuffer, bool()); 89 MOCK_METHOD0(SupportsGpuMemoryBuffer, bool());
91 MOCK_METHOD4(CreateGpuMemoryBuffer, 90 MOCK_METHOD4(CreateGpuMemoryBuffer,
92 gfx::GpuMemoryBuffer*(size_t width, 91 gfx::GpuMemoryBuffer*(size_t width,
93 size_t height, 92 size_t height,
94 unsigned internalformat, 93 unsigned internalformat,
95 int32* id)); 94 int32* id));
96 MOCK_METHOD1(DestroyGpuMemoryBuffer, void(int32 id)); 95 MOCK_METHOD1(DestroyGpuMemoryBuffer, void(int32 id));
97 MOCK_METHOD2(GenerateMailboxNames, bool(unsigned num, 96 MOCK_METHOD2(GenerateMailboxNames, bool(unsigned num,
98 std::vector<gpu::Mailbox>* names)); 97 std::vector<gpu::Mailbox>* names));
98 MOCK_METHOD0(InsertSyncPoint, uint32());
99 MOCK_METHOD2(SignalSyncPoint, void(uint32 id,
100 const base::Closure& callback));
99 101
100 private: 102 private:
101 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); 103 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl);
102 }; 104 };
103 105
104 } // namespace gpu 106 } // namespace gpu
105 107
106 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 108 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
107 109
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.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