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

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

Issue 10812002: Bug fixes for getTranslatedShader (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: last fixes 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
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_PROGRAM_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 bool IsOwned(ProgramInfo* info); 345 bool IsOwned(ProgramInfo* info);
346 346
347 static int32 MakeFakeLocation(int32 index, int32 element); 347 static int32 MakeFakeLocation(int32 index, int32 element);
348 348
349 // Cache-aware shader compiling. If no cache or if the shader wasn't 349 // Cache-aware shader compiling. If no cache or if the shader wasn't
350 // previously compiled, ForceCompileShader is called 350 // previously compiled, ForceCompileShader is called
351 void DoCompileShader(ShaderManager::ShaderInfo* info, 351 void DoCompileShader(ShaderManager::ShaderInfo* info,
352 ShaderTranslator* translator, 352 ShaderTranslator* translator,
353 FeatureInfo* feature_info); 353 FeatureInfo* feature_info);
354 354
355 private:
356 // Actually compiles the shader 355 // Actually compiles the shader
357 void ForceCompileShader(const std::string* source, 356 void ForceCompileShader(const std::string* source,
358 ShaderManager::ShaderInfo* info, 357 ShaderManager::ShaderInfo* info,
359 ShaderTranslator* translator, 358 ShaderTranslator* translator,
360 FeatureInfo* feature_info); 359 FeatureInfo* feature_info);
361 360
361 private:
362 void StartTracking(ProgramInfo* info); 362 void StartTracking(ProgramInfo* info);
363 void StopTracking(ProgramInfo* info); 363 void StopTracking(ProgramInfo* info);
364 364
365 // Info for each "successfully linked" program by service side program Id. 365 // Info for each "successfully linked" program by service side program Id.
366 // TODO(gman): Choose a faster container. 366 // TODO(gman): Choose a faster container.
367 typedef std::map<GLuint, ProgramInfo::Ref> ProgramInfoMap; 367 typedef std::map<GLuint, ProgramInfo::Ref> ProgramInfoMap;
368 ProgramInfoMap program_infos_; 368 ProgramInfoMap program_infos_;
369 369
370 // Counts the number of ProgramInfo allocated with 'this' as its manager. 370 // Counts the number of ProgramInfo allocated with 'this' as its manager.
371 // Allows to check no ProgramInfo will outlive this. 371 // Allows to check no ProgramInfo will outlive this.
(...skipping 11 matching lines...) Expand all
383 void RemoveProgramInfoIfUnused( 383 void RemoveProgramInfoIfUnused(
384 ShaderManager* shader_manager, ProgramInfo* info); 384 ShaderManager* shader_manager, ProgramInfo* info);
385 385
386 DISALLOW_COPY_AND_ASSIGN(ProgramManager); 386 DISALLOW_COPY_AND_ASSIGN(ProgramManager);
387 }; 387 };
388 388
389 } // namespace gles2 389 } // namespace gles2
390 } // namespace gpu 390 } // namespace gpu
391 391
392 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_ 392 #endif // GPU_COMMAND_BUFFER_SERVICE_PROGRAM_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/program_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698