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

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: 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
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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 654
655 bool needColorFilterUniform; 655 bool needColorFilterUniform;
656 bool needComputedColor; 656 bool needComputedColor;
657 need_blend_inputs(uniformCoeff, colorCoeff, 657 need_blend_inputs(uniformCoeff, colorCoeff,
658 &needColorFilterUniform, &needComputedColor); 658 &needColorFilterUniform, &needComputedColor);
659 659
660 // the dual source output has no canonical var name, have to 660 // the dual source output has no canonical var name, have to
661 // declare an output, which is incompatible with gl_FragColor/gl_FragData. 661 // declare an output, which is incompatible with gl_FragColor/gl_FragData.
662 bool dualSourceOutputWritten = false; 662 bool dualSourceOutputWritten = false;
663 builder.fHeader.append(GrGetGLSLVersionDecl(fContext.info().binding(),
664 fContext.info().glslGeneration() ));
665 663
666 GrGLShaderVar colorOutput; 664 GrGLShaderVar colorOutput;
667 bool isColorDeclared = GrGLSLSetupFSColorOuput(fContext.info().glslGeneratio n(), 665 bool isColorDeclared = GrGLSLSetupFSColorOuput(fContext.info().glslGeneratio n(),
668 declared_color_output_name(), 666 declared_color_output_name(),
669 &colorOutput); 667 &colorOutput);
670 if (isColorDeclared) { 668 if (isColorDeclared) {
671 builder.fFSOutputs.push_back(colorOutput); 669 builder.fFSOutputs.push_back(colorOutput);
672 } 670 }
673 671
674 const char* viewMName; 672 const char* viewMName;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 SkScalarToFloat(m[SkMatrix::kMTransX]), 1106 SkScalarToFloat(m[SkMatrix::kMTransX]),
1109 SkScalarToFloat(m[SkMatrix::kMTransY]), 1107 SkScalarToFloat(m[SkMatrix::kMTransY]),
1110 SkScalarToFloat(m[SkMatrix::kMPersp2]) 1108 SkScalarToFloat(m[SkMatrix::kMPersp2])
1111 }; 1109 };
1112 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt); 1110 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, mt);
1113 fMatrixState.fViewMatrix = drawState.getViewMatrix(); 1111 fMatrixState.fViewMatrix = drawState.getViewMatrix();
1114 fMatrixState.fRenderTargetSize = size; 1112 fMatrixState.fRenderTargetSize = size;
1115 fMatrixState.fRenderTargetOrigin = rt->origin(); 1113 fMatrixState.fRenderTargetOrigin = rt->origin();
1116 } 1114 }
1117 } 1115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698