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

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

Issue 373833002: Fix gpu_unittests for new Shader Translator header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO comments Created 6 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager_unittest.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 // 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CommandBufferEngine *engine_; 72 CommandBufferEngine *engine_;
73 }; 73 };
74 74
75 namespace gles2 { 75 namespace gles2 {
76 76
77 class MockShaderTranslator : public ShaderTranslatorInterface { 77 class MockShaderTranslator : public ShaderTranslatorInterface {
78 public: 78 public:
79 MockShaderTranslator(); 79 MockShaderTranslator();
80 virtual ~MockShaderTranslator(); 80 virtual ~MockShaderTranslator();
81 81
82 #if (ANGLE_SH_VERSION >= 126)
83 MOCK_METHOD5(Init, bool(
84 sh::GLenum shader_type,
85 ShShaderSpec shader_spec,
86 const ShBuiltInResources* resources,
87 GlslImplementationType glsl_implementation_type,
88 ShCompileOptions driver_bug_workarounds));
89 #else
82 MOCK_METHOD5(Init, bool( 90 MOCK_METHOD5(Init, bool(
83 ShShaderType shader_type, 91 ShShaderType shader_type,
84 ShShaderSpec shader_spec, 92 ShShaderSpec shader_spec,
85 const ShBuiltInResources* resources, 93 const ShBuiltInResources* resources,
86 GlslImplementationType glsl_implementation_type, 94 GlslImplementationType glsl_implementation_type,
87 ShCompileOptions driver_bug_workarounds)); 95 ShCompileOptions driver_bug_workarounds));
96 #endif
88 MOCK_METHOD1(Translate, bool(const char* shader)); 97 MOCK_METHOD1(Translate, bool(const char* shader));
89 MOCK_CONST_METHOD0(translated_shader, const char*()); 98 MOCK_CONST_METHOD0(translated_shader, const char*());
90 MOCK_CONST_METHOD0(info_log, const char*()); 99 MOCK_CONST_METHOD0(info_log, const char*());
91 MOCK_CONST_METHOD0(attrib_map, const VariableMap&()); 100 MOCK_CONST_METHOD0(attrib_map, const VariableMap&());
92 MOCK_CONST_METHOD0(uniform_map, const VariableMap&()); 101 MOCK_CONST_METHOD0(uniform_map, const VariableMap&());
93 MOCK_CONST_METHOD0(varying_map, const VariableMap&()); 102 MOCK_CONST_METHOD0(varying_map, const VariableMap&());
94 MOCK_CONST_METHOD0(name_map, const NameMap&()); 103 MOCK_CONST_METHOD0(name_map, const NameMap&());
95 MOCK_CONST_METHOD0( 104 MOCK_CONST_METHOD0(
96 GetStringForOptionsThatWouldAffectCompilation, std::string()); 105 GetStringForOptionsThatWouldAffectCompilation, std::string());
97 }; 106 };
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 private: 144 private:
136 friend class ::testing::StrictMock<MockMemoryTracker>; 145 friend class ::testing::StrictMock<MockMemoryTracker>;
137 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >; 146 friend class base::RefCounted< ::testing::StrictMock<MockMemoryTracker> >;
138 virtual ~MockMemoryTracker(); 147 virtual ~MockMemoryTracker();
139 }; 148 };
140 149
141 } // namespace gles2 150 } // namespace gles2
142 } // namespace gpu 151 } // namespace gpu
143 152
144 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_ 153 #endif // GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698