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

Unified Diff: src/gpu/gl/GrGLGeometryProcessor.cpp

Issue 1438003003: Move all ShaderBuilder files to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@glslProgBuild
Patch Set: nits Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLFragmentProcessor.cpp ('k') | src/gpu/gl/GrGLPrimitiveProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGeometryProcessor.cpp
diff --git a/src/gpu/gl/GrGLGeometryProcessor.cpp b/src/gpu/gl/GrGLGeometryProcessor.cpp
index c01e305679858a7cc6353de0b3be1ac0e41d645e..de4a5a3263619a8e11fe7734e75a36b7ea632bf1 100644
--- a/src/gpu/gl/GrGLGeometryProcessor.cpp
+++ b/src/gpu/gl/GrGLGeometryProcessor.cpp
@@ -7,11 +7,13 @@
#include "GrGLGeometryProcessor.h"
-#include "builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProcessorTypes.h"
+#include "glsl/GrGLSLProgramBuilder.h"
+#include "glsl/GrGLSLVertexShaderBuilder.h"
void GrGLGeometryProcessor::emitCode(EmitArgs& args) {
- GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder();
+ GrGLSLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder();
GrGPArgs gpArgs;
this->onEmitCode(args, &gpArgs);
vsBuilder->transformToNormalizedDeviceSpace(gpArgs.fPositionVar);
@@ -23,7 +25,7 @@ void GrGLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
const SkMatrix& localMatrix,
const TransformsIn& tin,
TransformsOut* tout) {
- GrGLVertexBuilder* vb = pb->getVertexShaderBuilder();
+ GrGLSLVertexBuilder* vb = pb->getVertexShaderBuilder();
tout->push_back_n(tin.count());
fInstalledTransforms.push_back_n(tin.count());
for (int i = 0; i < tin.count(); i++) {
@@ -45,7 +47,7 @@ void GrGLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
const char* uniName;
fInstalledTransforms[i][t].fHandle =
- pb->addUniform(GrGLProgramBuilder::kVertex_Visibility,
+ pb->addUniform(GrGLSLProgramBuilder::kVertex_Visibility,
kMat33f_GrSLType, precision,
strUniName.c_str(),
&uniName).toIndex();
@@ -94,7 +96,7 @@ void GrGLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
const char* localCoords,
const TransformsIn& tin,
TransformsOut* tout) {
- GrGLVertexBuilder* vb = pb->getVertexShaderBuilder();
+ GrGLSLVertexBuilder* vb = pb->getVertexShaderBuilder();
tout->push_back_n(tin.count());
for (int i = 0; i < tin.count(); i++) {
const ProcCoords& coordTransforms = tin[i];
@@ -122,7 +124,7 @@ void GrGLGeometryProcessor::emitTransforms(GrGLSLGPBuilder* pb,
void GrGLGeometryProcessor::setupPosition(GrGLSLGPBuilder* pb,
GrGPArgs* gpArgs,
const char* posName) {
- GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder();
+ GrGLSLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder();
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
vsBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
}
@@ -132,13 +134,13 @@ void GrGLGeometryProcessor::setupPosition(GrGLSLGPBuilder* pb,
const char* posName,
const SkMatrix& mat,
UniformHandle* viewMatrixUniform) {
- GrGLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder();
+ GrGLSLVertexBuilder* vsBuilder = pb->getVertexShaderBuilder();
if (mat.isIdentity()) {
gpArgs->fPositionVar.set(kVec2f_GrSLType, "pos2");
vsBuilder->codeAppendf("vec2 %s = %s;", gpArgs->fPositionVar.c_str(), posName);
} else {
const char* viewMatrixName;
- *viewMatrixUniform = pb->addUniform(GrGLProgramBuilder::kVertex_Visibility,
+ *viewMatrixUniform = pb->addUniform(GrGLSLProgramBuilder::kVertex_Visibility,
kMat33f_GrSLType, kHigh_GrSLPrecision,
"uViewM",
&viewMatrixName);
« no previous file with comments | « src/gpu/gl/GrGLFragmentProcessor.cpp ('k') | src/gpu/gl/GrGLPrimitiveProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698