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

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: Created 7 years, 5 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 int32 GetLastToken() OVERRIDE; 32 virtual int32 GetLastToken() OVERRIDE;
33 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE; 33 virtual State FlushSync(int32 put_offset, int32 last_known_get) OVERRIDE;
34 virtual void SetGetBuffer(int transfer_buffer_id) OVERRIDE; 34 virtual void SetGetBuffer(int transfer_buffer_id) OVERRIDE;
35 virtual void SetGetOffset(int32 get_offset) OVERRIDE; 35 virtual void SetGetOffset(int32 get_offset) OVERRIDE;
36 virtual Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE; 36 virtual Buffer CreateTransferBuffer(size_t size, int32* id) OVERRIDE;
37 virtual Buffer GetTransferBuffer(int32 id) OVERRIDE; 37 virtual Buffer GetTransferBuffer(int32 id) OVERRIDE;
38 virtual void SetToken(int32 token) OVERRIDE; 38 virtual void SetToken(int32 token) OVERRIDE;
39 virtual void SetParseError(error::Error error) OVERRIDE; 39 virtual void SetParseError(error::Error error) OVERRIDE;
40 virtual void SetContextLostReason(error::ContextLostReason reason) OVERRIDE; 40 virtual void SetContextLostReason(error::ContextLostReason reason) OVERRIDE;
41 virtual uint32 InsertSyncPoint() OVERRIDE; 41 virtual uint32 InsertSyncPoint() OVERRIDE;
42 virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer(
43 size_t width,
44 size_t height,
45 unsigned internalformat,
46 int32* id) OVERRIDE;
47 virtual void DestroyGpuMemoryBuffer(int32 id) OVERRIDE;
42 48
43 // Get's the Id of the next transfer buffer that will be returned 49 // Get's the Id of the next transfer buffer that will be returned
44 // by CreateTransferBuffer. This is useful for testing expected ids. 50 // by CreateTransferBuffer. This is useful for testing expected ids.
45 int32 GetNextFreeTransferBufferId(); 51 int32 GetNextFreeTransferBufferId();
46 52
47 void FlushHelper(int32 put_offset); 53 void FlushHelper(int32 put_offset);
48 void DestroyTransferBufferHelper(int32 id); 54 void DestroyTransferBufferHelper(int32 id);
49 55
50 virtual void OnFlush() = 0; 56 virtual void OnFlush() = 0;
51 57
(...skipping 26 matching lines...) Expand all
78 84
79 MOCK_METHOD1(Flush, void(int32 put_offset)); 85 MOCK_METHOD1(Flush, void(int32 put_offset));
80 86
81 void DelegateToFake(); 87 void DelegateToFake();
82 }; 88 };
83 89
84 } // namespace gpu 90 } // namespace gpu
85 91
86 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 92 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
87 93
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698