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

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: Include proper internalformat support.[D 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
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;
48 virtual gfx::GLImage* GetImage(int32 id) OVERRIDE;
42 49
43 // Get's the Id of the next transfer buffer that will be returned 50 // Get's the Id of the next transfer buffer that will be returned
44 // by CreateTransferBuffer. This is useful for testing expected ids. 51 // by CreateTransferBuffer. This is useful for testing expected ids.
45 int32 GetNextFreeTransferBufferId(); 52 int32 GetNextFreeTransferBufferId();
46 53
47 void FlushHelper(int32 put_offset); 54 void FlushHelper(int32 put_offset);
48 void DestroyTransferBufferHelper(int32 id); 55 void DestroyTransferBufferHelper(int32 id);
49 56
50 virtual void OnFlush() = 0; 57 virtual void OnFlush() = 0;
51 58
(...skipping 26 matching lines...) Expand all
78 85
79 MOCK_METHOD1(Flush, void(int32 put_offset)); 86 MOCK_METHOD1(Flush, void(int32 put_offset));
80 87
81 void DelegateToFake(); 88 void DelegateToFake();
82 }; 89 };
83 90
84 } // namespace gpu 91 } // namespace gpu
85 92
86 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ 93 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_
87 94
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698