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

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

Issue 1428543003: Create GLSL base class for ProgramDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add space Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgramDataManager.h ('k') | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDataManager.cpp
diff --git a/src/gpu/gl/GrGLProgramDataManager.cpp b/src/gpu/gl/GrGLProgramDataManager.cpp
index 590287e318cc2202de9e82b7f17f08c0751943a6..7320b2dd8a44fa0b7b84310a7d5b027b7f69e7e3 100644
--- a/src/gpu/gl/GrGLProgramDataManager.cpp
+++ b/src/gpu/gl/GrGLProgramDataManager.cpp
@@ -60,7 +60,7 @@ GrGLProgramDataManager::GrGLProgramDataManager(GrGLGpu* gpu, GrGLuint programID,
}
}
-void GrGLProgramDataManager::setSampler(UniformHandle u, GrGLint texUnit) const {
+void GrGLProgramDataManager::setSampler(UniformHandle u, int texUnit) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kSampler2D_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -76,7 +76,7 @@ void GrGLProgramDataManager::setSampler(UniformHandle u, GrGLint texUnit) const
}
}
-void GrGLProgramDataManager::set1f(UniformHandle u, GrGLfloat v0) const {
+void GrGLProgramDataManager::set1f(UniformHandle u, float v0) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kFloat_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -91,7 +91,7 @@ void GrGLProgramDataManager::set1f(UniformHandle u, GrGLfloat v0) const {
void GrGLProgramDataManager::set1fv(UniformHandle u,
int arrayCount,
- const GrGLfloat v[]) const {
+ const float v[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kFloat_GrSLType);
SkASSERT(arrayCount > 0);
@@ -108,7 +108,7 @@ void GrGLProgramDataManager::set1fv(UniformHandle u,
}
}
-void GrGLProgramDataManager::set2f(UniformHandle u, GrGLfloat v0, GrGLfloat v1) const {
+void GrGLProgramDataManager::set2f(UniformHandle u, float v0, float v1) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec2f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -123,7 +123,7 @@ void GrGLProgramDataManager::set2f(UniformHandle u, GrGLfloat v0, GrGLfloat v1)
void GrGLProgramDataManager::set2fv(UniformHandle u,
int arrayCount,
- const GrGLfloat v[]) const {
+ const float v[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec2f_GrSLType);
SkASSERT(arrayCount > 0);
@@ -137,7 +137,7 @@ void GrGLProgramDataManager::set2fv(UniformHandle u,
}
}
-void GrGLProgramDataManager::set3f(UniformHandle u, GrGLfloat v0, GrGLfloat v1, GrGLfloat v2) const {
+void GrGLProgramDataManager::set3f(UniformHandle u, float v0, float v1, float v2) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec3f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -152,7 +152,7 @@ void GrGLProgramDataManager::set3f(UniformHandle u, GrGLfloat v0, GrGLfloat v1,
void GrGLProgramDataManager::set3fv(UniformHandle u,
int arrayCount,
- const GrGLfloat v[]) const {
+ const float v[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec3f_GrSLType);
SkASSERT(arrayCount > 0);
@@ -167,10 +167,10 @@ void GrGLProgramDataManager::set3fv(UniformHandle u,
}
void GrGLProgramDataManager::set4f(UniformHandle u,
- GrGLfloat v0,
- GrGLfloat v1,
- GrGLfloat v2,
- GrGLfloat v3) const {
+ float v0,
+ float v1,
+ float v2,
+ float v3) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec4f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -185,7 +185,7 @@ void GrGLProgramDataManager::set4f(UniformHandle u,
void GrGLProgramDataManager::set4fv(UniformHandle u,
int arrayCount,
- const GrGLfloat v[]) const {
+ const float v[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kVec4f_GrSLType);
SkASSERT(arrayCount > 0);
@@ -199,7 +199,7 @@ void GrGLProgramDataManager::set4fv(UniformHandle u,
}
}
-void GrGLProgramDataManager::setMatrix3f(UniformHandle u, const GrGLfloat matrix[]) const {
+void GrGLProgramDataManager::setMatrix3f(UniformHandle u, const float matrix[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kMat33f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -212,7 +212,7 @@ void GrGLProgramDataManager::setMatrix3f(UniformHandle u, const GrGLfloat matrix
}
}
-void GrGLProgramDataManager::setMatrix4f(UniformHandle u, const GrGLfloat matrix[]) const {
+void GrGLProgramDataManager::setMatrix4f(UniformHandle u, const float matrix[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kMat44f_GrSLType);
SkASSERT(GrGLSLShaderVar::kNonArray == uni.fArrayCount);
@@ -227,7 +227,7 @@ void GrGLProgramDataManager::setMatrix4f(UniformHandle u, const GrGLfloat matrix
void GrGLProgramDataManager::setMatrix3fv(UniformHandle u,
int arrayCount,
- const GrGLfloat matrices[]) const {
+ const float matrices[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kMat33f_GrSLType);
SkASSERT(arrayCount > 0);
@@ -245,7 +245,7 @@ void GrGLProgramDataManager::setMatrix3fv(UniformHandle u,
void GrGLProgramDataManager::setMatrix4fv(UniformHandle u,
int arrayCount,
- const GrGLfloat matrices[]) const {
+ const float matrices[]) const {
const Uniform& uni = fUniforms[u.toIndex()];
SkASSERT(uni.fType == kMat44f_GrSLType);
SkASSERT(arrayCount > 0);
@@ -262,7 +262,7 @@ void GrGLProgramDataManager::setMatrix4fv(UniformHandle u,
}
void GrGLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) const {
- GrGLfloat mt[] = {
+ float mt[] = {
matrix.get(SkMatrix::kMScaleX),
matrix.get(SkMatrix::kMSkewY),
matrix.get(SkMatrix::kMPersp0),
« no previous file with comments | « src/gpu/gl/GrGLProgramDataManager.h ('k') | src/gpu/gl/GrGLUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698