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

Unified Diff: src/gpu/GrDrawState.h

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/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.h
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 785be77f58e2ca0fd7ce9f4e7d2b49f25e01d972..e9b257e8a230be4edf8dbc2b615271a882db5b28 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -63,7 +63,7 @@ public:
}
}
- virtual ~GrDrawState() { GrAssert(0 == fBlockEffectRemovalCnt); }
+ virtual ~GrDrawState() { SkASSERT(0 == fBlockEffectRemovalCnt); }
/**
* Resets to the default state. GrEffects will be removed from all stages.
@@ -152,7 +152,7 @@ public:
class AutoVertexAttribRestore {
public:
AutoVertexAttribRestore(GrDrawState* drawState) {
- GrAssert(NULL != drawState);
+ SkASSERT(NULL != drawState);
fDrawState = drawState;
fVAPtr = drawState->fCommon.fVAPtr;
fVACount = drawState->fCommon.fVACount;
@@ -359,13 +359,13 @@ public:
////
const GrEffectRef* addColorEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
- GrAssert(NULL != effect);
+ SkASSERT(NULL != effect);
SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, attr1));
return effect;
}
const GrEffectRef* addCoverageEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
- GrAssert(NULL != effect);
+ SkASSERT(NULL != effect);
SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect, attr0, attr1));
return effect;
}
@@ -414,10 +414,10 @@ public:
void set(GrDrawState* ds) {
if (NULL != fDrawState) {
int n = fDrawState->fColorStages.count() - fColorEffectCnt;
- GrAssert(n >= 0);
+ SkASSERT(n >= 0);
fDrawState->fColorStages.pop_back_n(n);
n = fDrawState->fCoverageStages.count() - fCoverageEffectCnt;
- GrAssert(n >= 0);
+ SkASSERT(n >= 0);
fDrawState->fCoverageStages.pop_back_n(n);
GR_DEBUGCODE(--fDrawState->fBlockEffectRemovalCnt;)
}
@@ -682,7 +682,7 @@ public:
this->restore();
if (NULL != ds) {
- GrAssert(NULL == fSavedTarget);
+ SkASSERT(NULL == fSavedTarget);
fSavedTarget = ds->getRenderTarget();
SkSafeRef(fSavedTarget);
ds->setRenderTarget(newTarget);
@@ -847,7 +847,7 @@ public:
* @param face the face(s) to draw.
*/
void setDrawFace(DrawFace face) {
- GrAssert(kInvalid_DrawFace != face);
+ SkASSERT(kInvalid_DrawFace != face);
fCommon.fDrawFace = face;
}
@@ -884,7 +884,7 @@ public:
bool operator !=(const GrDrawState& s) const { return !(*this == s); }
GrDrawState& operator= (const GrDrawState& s) {
- GrAssert(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages());
+ SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages());
this->setRenderTarget(s.fRenderTarget.get());
fCommon = s.fCommon;
fColorStages = s.fColorStages;
@@ -895,7 +895,7 @@ public:
private:
void onReset(const SkMatrix* initialViewMatrix) {
- GrAssert(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages());
+ SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages());
fColorStages.reset();
fCoverageStages.reset();
@@ -955,7 +955,7 @@ private:
fColorFilterMode == other.fColorFilterMode &&
fColorFilterColor == other.fColorFilterColor &&
fDrawFace == other.fDrawFace;
- GrAssert(!result || 0 == memcmp(fFixedFunctionVertexAttribIndices,
+ SkASSERT(!result || 0 == memcmp(fFixedFunctionVertexAttribIndices,
other.fFixedFunctionVertexAttribIndices,
sizeof(fFixedFunctionVertexAttribIndices)));
return result;
@@ -1006,7 +1006,7 @@ public:
}
void restoreTo(GrDrawState* drawState) {
- GrAssert(fInitialized);
+ SkASSERT(fInitialized);
drawState->fCommon = fCommon;
drawState->setRenderTarget(fRenderTarget);
// reinflate color/cov stage arrays.
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrDrawState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698