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

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

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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/GrGLEffectMatrix.h ('k') | src/gpu/gl/GrGLIRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLEffectMatrix.cpp
diff --git a/src/gpu/gl/GrGLEffectMatrix.cpp b/src/gpu/gl/GrGLEffectMatrix.cpp
index 437e6832c06984da3e66aa6e9dc413326d8a7aae..8c8dcce2934932948df6b280f2586826f1823d80 100644
--- a/src/gpu/gl/GrGLEffectMatrix.cpp
+++ b/src/gpu/gl/GrGLEffectMatrix.cpp
@@ -101,11 +101,11 @@ GrSLType GrGLEffectMatrix::emitCode(GrGLShaderBuilder* builder,
const GrGLShaderVar* coords;
switch (fCoordsType) {
case GrEffect::kLocal_CoordsType:
- GrAssert(!(kPositionCoords_Flag & key));
+ SkASSERT(!(kPositionCoords_Flag & key));
coords = &builder->localCoordsAttribute();
break;
case GrEffect::kPosition_CoordsType:
- GrAssert((kPositionCoords_Flag & key) || !builder->hasExplicitLocalCoords());
+ SkASSERT((kPositionCoords_Flag & key) || !builder->hasExplicitLocalCoords());
coords = &builder->positionAttribute();
break;
default:
@@ -115,16 +115,16 @@ GrSLType GrGLEffectMatrix::emitCode(GrGLShaderBuilder* builder,
// varying = matrix * coords (logically)
switch (fUniType) {
case kVoid_GrSLType:
- GrAssert(kVec2f_GrSLType == varyingType);
+ SkASSERT(kVec2f_GrSLType == varyingType);
builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, coords->c_str());
break;
case kVec2f_GrSLType:
- GrAssert(kVec2f_GrSLType == varyingType);
+ SkASSERT(kVec2f_GrSLType == varyingType);
builder->vsCodeAppendf("\t%s = %s + %s;\n",
vsVaryingName, uniName, coords->c_str());
break;
case kMat33f_GrSLType: {
- GrAssert(kVec2f_GrSLType == varyingType || kVec3f_GrSLType == varyingType);
+ SkASSERT(kVec2f_GrSLType == varyingType || kVec3f_GrSLType == varyingType);
if (kVec2f_GrSLType == varyingType) {
builder->vsCodeAppendf("\t%s = (%s * vec3(%s, 1)).xy;\n",
vsVaryingName, uniName, coords->c_str());
@@ -189,19 +189,19 @@ void GrGLEffectMatrix::setData(const GrGLUniformManager& uniformManager,
const SkMatrix& matrix,
const GrDrawEffect& drawEffect,
const GrTexture* texture) {
- GrAssert(fUni.isValid() != (kVoid_GrSLType == fUniType));
+ SkASSERT(fUni.isValid() != (kVoid_GrSLType == fUniType));
const SkMatrix& coordChangeMatrix = GrEffect::kLocal_CoordsType == fCoordsType ?
drawEffect.getCoordChangeMatrix() :
SkMatrix::I();
switch (fUniType) {
case kVoid_GrSLType:
- GrAssert(matrix.isIdentity());
- GrAssert(coordChangeMatrix.isIdentity());
- GrAssert(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
+ SkASSERT(matrix.isIdentity());
+ SkASSERT(coordChangeMatrix.isIdentity());
+ SkASSERT(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
return;
case kVec2f_GrSLType: {
- GrAssert(SkMatrix::kTranslate_Mask == (matrix.getType() | coordChangeMatrix.getType()));
- GrAssert(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
+ SkASSERT(SkMatrix::kTranslate_Mask == (matrix.getType() | coordChangeMatrix.getType()));
+ SkASSERT(NULL == texture || kTopLeft_GrSurfaceOrigin == texture->origin());
SkScalar tx = matrix[SkMatrix::kMTransX] + (coordChangeMatrix)[SkMatrix::kMTransX];
SkScalar ty = matrix[SkMatrix::kMTransY] + (coordChangeMatrix)[SkMatrix::kMTransY];
if (fPrevMatrix.get(SkMatrix::kMTransX) != tx ||
« no previous file with comments | « src/gpu/gl/GrGLEffectMatrix.h ('k') | src/gpu/gl/GrGLIRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698