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

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

Issue 12326146: Refactor/Rename a bunch of GPU stuff (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 // This file contains definitions for mock objects, used for testing. 5 // This file contains definitions for mock objects, used for testing.
6 6
7 // TODO(apatrick): This file "manually" defines some mock objects. Using gMock 7 // TODO(apatrick): This file "manually" defines some mock objects. Using gMock
8 // would be definitely preferable, unfortunately it doesn't work on Windows yet. 8 // would be definitely preferable, unfortunately it doesn't work on Windows yet.
9 9
10 #ifndef GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ 10 #ifndef GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 MOCK_CONST_METHOD0(name_map, const NameMap&()); 92 MOCK_CONST_METHOD0(name_map, const NameMap&());
93 }; 93 };
94 94
95 class MockProgramCache : public ProgramCache { 95 class MockProgramCache : public ProgramCache {
96 public: 96 public:
97 MockProgramCache(); 97 MockProgramCache();
98 virtual ~MockProgramCache(); 98 virtual ~MockProgramCache();
99 99
100 MOCK_CONST_METHOD4(LoadLinkedProgram, ProgramLoadResult( 100 MOCK_CONST_METHOD4(LoadLinkedProgram, ProgramLoadResult(
101 GLuint program, 101 GLuint program,
102 ShaderManager::ShaderInfo* shader_a, 102 Shader* shader_a,
103 ShaderManager::ShaderInfo* shader_b, 103 Shader* shader_b,
104 const LocationMap* bind_attrib_location_map)); 104 const LocationMap* bind_attrib_location_map));
105 105
106 MOCK_METHOD4(SaveLinkedProgram, void( 106 MOCK_METHOD4(SaveLinkedProgram, void(
107 GLuint program, 107 GLuint program,
108 const ShaderManager::ShaderInfo* shader_a, 108 const Shader* shader_a,
109 const ShaderManager::ShaderInfo* shader_b, 109 const Shader* shader_b,
110 const LocationMap* bind_attrib_location_map)); 110 const LocationMap* bind_attrib_location_map));
111 private: 111 private:
112 MOCK_METHOD0(ClearBackend, void()); 112 MOCK_METHOD0(ClearBackend, void());
113 }; 113 };
114 114
115 class MockMemoryTracker : public MemoryTracker { 115 class MockMemoryTracker : public MemoryTracker {
116 public: 116 public:
117 MockMemoryTracker(); 117 MockMemoryTracker();
118 118
119 MOCK_METHOD3(TrackMemoryAllocatedChange, void( 119 MOCK_METHOD3(TrackMemoryAllocatedChange, void(
120 size_t old_size, size_t new_size, Pool pool)); 120 size_t old_size, size_t new_size, Pool pool));
121 MOCK_METHOD1(EnsureGPUMemoryAvailable, bool(size_t size_needed)); 121 MOCK_METHOD1(EnsureGPUMemoryAvailable, bool(size_t size_needed));
122 122
123 private: 123 private:
124 friend class ::testing::StrictMock<MockMemoryTracker>; 124 friend class ::testing::StrictMock<MockMemoryTracker>;
125 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; 125 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >;
126 virtual ~MockMemoryTracker(); 126 virtual ~MockMemoryTracker();
127 }; 127 };
128 128
129 } // namespace gles2 129 } // namespace gles2
130 } // namespace gpu 130 } // namespace gpu
131 131
132 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ 132 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/memory_program_cache_unittest.cc ('k') | gpu/command_buffer/service/program_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698