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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 10 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 #include "gpu/command_buffer/service/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1376 }
1377 1377
1378 ExecuteBindAttribLocationCalls(); 1378 ExecuteBindAttribLocationCalls();
1379 if (!ExecuteTransformFeedbackVaryingsCall()) { 1379 if (!ExecuteTransformFeedbackVaryingsCall()) {
1380 return false; 1380 return false;
1381 } 1381 }
1382 1382
1383 ExecuteProgramOutputBindCalls(); 1383 ExecuteProgramOutputBindCalls();
1384 1384
1385 before_time = TimeTicks::Now(); 1385 before_time = TimeTicks::Now();
1386 if (cache && gl::g_driver_gl.ext.b_GL_ARB_get_program_binary) { 1386 if (cache && gl::g_current_gl_driver->ext.b_GL_ARB_get_program_binary) {
1387 glProgramParameteri(service_id(), 1387 glProgramParameteri(service_id(),
1388 PROGRAM_BINARY_RETRIEVABLE_HINT, 1388 PROGRAM_BINARY_RETRIEVABLE_HINT,
1389 GL_TRUE); 1389 GL_TRUE);
1390 } 1390 }
1391 glLinkProgram(service_id()); 1391 glLinkProgram(service_id());
1392 } 1392 }
1393 1393
1394 GLint success = 0; 1394 GLint success = 0;
1395 glGetProgramiv(service_id(), GL_LINK_STATUS, &success); 1395 glGetProgramiv(service_id(), GL_LINK_STATUS, &success);
1396 if (success == GL_TRUE) { 1396 if (success == GL_TRUE) {
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 DCHECK(program); 2660 DCHECK(program);
2661 program->ClearUniforms(&zero_); 2661 program->ClearUniforms(&zero_);
2662 } 2662 }
2663 2663
2664 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { 2664 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) {
2665 return index + element * 0x10000; 2665 return index + element * 0x10000;
2666 } 2666 }
2667 2667
2668 } // namespace gles2 2668 } // namespace gles2
2669 } // namespace gpu 2669 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/memory_program_cache.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