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

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

Issue 11266023: Make GL calls go through subclassable class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 #include "gpu/command_buffer/service/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 translator, 524 translator,
525 feature_info); 525 feature_info);
526 CHECK(info->IsValid()); 526 CHECK(info->IsValid());
527 } 527 }
528 } 528 }
529 } 529 }
530 } 530 }
531 531
532 if (link) { 532 if (link) {
533 before_time = TimeTicks::HighResNow(); 533 before_time = TimeTicks::HighResNow();
534 if (cache && gfx::g_GL_ARB_get_program_binary) { 534 if (cache && gfx::g_driver_gl.ext.b_GL_ARB_get_program_binary) {
535 glProgramParameteri(service_id(), 535 glProgramParameteri(service_id(),
536 PROGRAM_BINARY_RETRIEVABLE_HINT, 536 PROGRAM_BINARY_RETRIEVABLE_HINT,
537 GL_TRUE); 537 GL_TRUE);
538 } 538 }
539 glLinkProgram(service_id()); 539 glLinkProgram(service_id());
540 } 540 }
541 541
542 GLint success = 0; 542 GLint success = 0;
543 glGetProgramiv(service_id(), GL_LINK_STATUS, &success); 543 glGetProgramiv(service_id(), GL_LINK_STATUS, &success);
544 if (success == GL_TRUE) { 544 if (success == GL_TRUE) {
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 info->ClearUniforms(&zero_); 1147 info->ClearUniforms(&zero_);
1148 } 1148 }
1149 } 1149 }
1150 1150
1151 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { 1151 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) {
1152 return index + element * 0x10000; 1152 return index + element * 0x10000;
1153 } 1153 }
1154 1154
1155 } // namespace gles2 1155 } // namespace gles2
1156 } // namespace gpu 1156 } // namespace gpu
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | gpu/command_buffer/service/program_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698