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

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

Issue 1441683008: Move GrGLPrimitive/GeometryProc to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@xferProcs
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/GrGLPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPrimitiveProcessor.cpp
diff --git a/src/gpu/gl/GrGLPrimitiveProcessor.cpp b/src/gpu/gl/GrGLPrimitiveProcessor.cpp
deleted file mode 100644
index 66d3892559dc16dde862f3e11f691deac8746d0b..0000000000000000000000000000000000000000
--- a/src/gpu/gl/GrGLPrimitiveProcessor.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrGLPrimitiveProcessor.h"
-
-#include "glsl/GrGLSLProgramBuilder.h"
-#include "glsl/GrGLSLFragmentShaderBuilder.h"
-
-SkMatrix GrGLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatrix,
- const GrCoordTransform& coordTransform) {
- SkMatrix combined;
- // We only apply the localmatrix to localcoords
- if (kLocal_GrCoordSet == coordTransform.sourceCoords()) {
- combined.setConcat(coordTransform.getMatrix(), localMatrix);
- } else {
- combined = coordTransform.getMatrix();
- }
- if (coordTransform.reverseY()) {
- // combined.postScale(1,-1);
- // combined.postTranslate(0,1);
- combined.set(SkMatrix::kMSkewY,
- combined[SkMatrix::kMPersp0] - combined[SkMatrix::kMSkewY]);
- combined.set(SkMatrix::kMScaleY,
- combined[SkMatrix::kMPersp1] - combined[SkMatrix::kMScaleY]);
- combined.set(SkMatrix::kMTransY,
- combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]);
- }
- return combined;
-}
-
-void GrGLPrimitiveProcessor::setupUniformColor(GrGLSLGPBuilder* pb,
- const char* outputName,
- UniformHandle* colorUniform) {
- GrGLSLFragmentBuilder* fs = pb->getFragmentShaderBuilder();
- SkASSERT(colorUniform);
- const char* stagedLocalVarName;
- *colorUniform = pb->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
- kVec4f_GrSLType,
- kDefault_GrSLPrecision,
- "Color",
- &stagedLocalVarName);
- fs->codeAppendf("%s = %s;", outputName, stagedLocalVarName);
-}
« no previous file with comments | « src/gpu/gl/GrGLPrimitiveProcessor.h ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698