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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 140843003: Make GrGLContextInfo have private ptr to GrGLInterface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tot Created 6 years, 11 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
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 if (0 == shaderId) { 642 if (0 == shaderId) {
643 return false; 643 return false;
644 } 644 }
645 645
646 const GrGLchar* sourceStr = shaderSrc.c_str(); 646 const GrGLchar* sourceStr = shaderSrc.c_str();
647 GrGLint sourceLength = static_cast<GrGLint>(shaderSrc.size()); 647 GrGLint sourceLength = static_cast<GrGLint>(shaderSrc.size());
648 GR_GL_CALL(gli, ShaderSource(shaderId, 1, &sourceStr, &sourceLength)); 648 GR_GL_CALL(gli, ShaderSource(shaderId, 1, &sourceStr, &sourceLength));
649 GR_GL_CALL(gli, CompileShader(shaderId)); 649 GR_GL_CALL(gli, CompileShader(shaderId));
650 650
651 // Calling GetShaderiv in Chromium is quite expensive. Assume success in rel ease builds. 651 // Calling GetShaderiv in Chromium is quite expensive. Assume success in rel ease builds.
652 bool checkCompiled = !glCtx.info().isChromium(); 652 bool checkCompiled = !glCtx.isChromium();
653 #ifdef SK_DEBUG 653 #ifdef SK_DEBUG
654 checkCompiled = true; 654 checkCompiled = true;
655 #endif 655 #endif
656 if (checkCompiled) { 656 if (checkCompiled) {
657 GrGLint compiled = GR_GL_INIT_ZERO; 657 GrGLint compiled = GR_GL_INIT_ZERO;
658 GR_GL_CALL(gli, GetShaderiv(shaderId, GR_GL_COMPILE_STATUS, &compiled)); 658 GR_GL_CALL(gli, GetShaderiv(shaderId, GR_GL_COMPILE_STATUS, &compiled));
659 659
660 if (!compiled) { 660 if (!compiled) {
661 GrGLint infoLen = GR_GL_INIT_ZERO; 661 GrGLint infoLen = GR_GL_INIT_ZERO;
662 GR_GL_CALL(gli, GetShaderiv(shaderId, GR_GL_INFO_LOG_LENGTH, &infoLe n)); 662 GR_GL_CALL(gli, GetShaderiv(shaderId, GR_GL_INFO_LOG_LENGTH, &infoLe n));
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 GrGLSLExpr4* inOutFSColor) { 977 GrGLSLExpr4* inOutFSColor) {
978 978
979 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); 979 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt);
980 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, 980 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder,
981 effectStages, 981 effectStages,
982 effectKeys, 982 effectKeys,
983 effectCnt, 983 effectCnt,
984 inOutFSColor); 984 inOutFSColor);
985 return texGenEffectsBuilder.finish(); 985 return texGenEffectsBuilder.finish();
986 } 986 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLContext.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698