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

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

Issue 10795037: Revert 147328 - Current status of patch: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 25 matching lines...) Expand all
36 VariableInfo() 36 VariableInfo()
37 : type(0), 37 : type(0),
38 size(0) { 38 size(0) {
39 } 39 }
40 40
41 VariableInfo(int _type, int _size, std::string _name) 41 VariableInfo(int _type, int _size, std::string _name)
42 : type(_type), 42 : type(_type),
43 size(_size), 43 size(_size),
44 name(_name) { 44 name(_name) {
45 } 45 }
46 bool operator==(
47 const ShaderTranslatorInterface::VariableInfo& other) const {
48 return type == other.type &&
49 size == other.size &&
50 strcmp(name.c_str(), other.name.c_str()) == 0;
51 }
52 46
53 int type; 47 int type;
54 int size; 48 int size;
55 std::string name; // name in the original shader source. 49 std::string name; // name in the original shader source.
56 }; 50 };
57 51
58 // Mapping between variable name and info. 52 // Mapping between variable name and info.
59 typedef base::hash_map<std::string, VariableInfo> VariableMap; 53 typedef base::hash_map<std::string, VariableInfo> VariableMap;
60 54
61 // Initializes the translator. 55 // Initializes the translator.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ObserverList<DestructionObserver> destruction_observers_; 135 ObserverList<DestructionObserver> destruction_observers_;
142 136
143 DISALLOW_COPY_AND_ASSIGN(ShaderTranslator); 137 DISALLOW_COPY_AND_ASSIGN(ShaderTranslator);
144 }; 138 };
145 139
146 } // namespace gles2 140 } // namespace gles2
147 } // namespace gpu 141 } // namespace gpu
148 142
149 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_ 143 #endif // GPU_COMMAND_BUFFER_SERVICE_SHADER_TRANSLATOR_H_
150 144
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_manager_unittest.cc ('k') | gpu/command_buffer/service/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698