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

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

Issue 12668019: Make GrGLShaderBuilder responsible for enabling GLSL extensions (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: sync to TOT Created 7 years, 8 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/effects/GrEdgeEffect.cpp ('k') | src/gpu/gl/GrGLSL.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 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 "GrGLProgram.h" 8 #include "GrGLProgram.h"
9 9
10 #include "GrAllocator.h" 10 #include "GrAllocator.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 456
457 bool needColorFilterUniform; 457 bool needColorFilterUniform;
458 bool needComputedColor; 458 bool needComputedColor;
459 need_blend_inputs(uniformCoeff, colorCoeff, 459 need_blend_inputs(uniformCoeff, colorCoeff,
460 &needColorFilterUniform, &needComputedColor); 460 &needColorFilterUniform, &needComputedColor);
461 461
462 // the dual source output has no canonical var name, have to 462 // the dual source output has no canonical var name, have to
463 // declare an output, which is incompatible with gl_FragColor/gl_FragData. 463 // declare an output, which is incompatible with gl_FragColor/gl_FragData.
464 bool dualSourceOutputWritten = false; 464 bool dualSourceOutputWritten = false;
465 builder.fHeader.append(GrGetGLSLVersionDecl(fContext.info().binding(),
466 fContext.info().glslGeneration() ));
467 465
468 GrGLShaderVar colorOutput; 466 GrGLShaderVar colorOutput;
469 bool isColorDeclared = GrGLSLSetupFSColorOuput(fContext.info().glslGeneratio n(), 467 bool isColorDeclared = GrGLSLSetupFSColorOuput(fContext.info().glslGeneratio n(),
470 declared_color_output_name(), 468 declared_color_output_name(),
471 &colorOutput); 469 &colorOutput);
472 if (isColorDeclared) { 470 if (isColorDeclared) {
473 builder.fFSOutputs.push_back(colorOutput); 471 builder.fFSOutputs.push_back(colorOutput);
474 } 472 }
475 473
476 const char* viewMName; 474 const char* viewMName;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 SkScalarToFloat(m[SkMatrix::kMTransX]), 951 SkScalarToFloat(m[SkMatrix::kMTransX]),
954 SkScalarToFloat(m[SkMatrix::kMTransY]), 952 SkScalarToFloat(m[SkMatrix::kMTransY]),
955 SkScalarToFloat(m[SkMatrix::kMPersp2]) 953 SkScalarToFloat(m[SkMatrix::kMPersp2])
956 }; 954 };
957 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt); 955 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt);
958 fMatrixState.fViewMatrix = drawState.getViewMatrix(); 956 fMatrixState.fViewMatrix = drawState.getViewMatrix();
959 fMatrixState.fRenderTargetSize = size; 957 fMatrixState.fRenderTargetSize = size;
960 fMatrixState.fRenderTargetOrigin = rt->origin(); 958 fMatrixState.fRenderTargetOrigin = rt->origin();
961 } 959 }
962 } 960 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrEdgeEffect.cpp ('k') | src/gpu/gl/GrGLSL.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698