aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-17 00:02:59 +0000
committerGravatar tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-17 00:02:59 +0000
commitf6de475e5cbd143f348ff7738919e397b7fe7f57 (patch)
tree8d8a123db2adbd7cbe6b55651b1c9117d6eafdb8 /include/gpu
parent069975678aaca6dc767e9fef3d743694443223f1 (diff)
Replace uses of GrAssert by SkASSERT.
R=bsalomon@google.com Review URL: https://codereview.chromium.org/22850006 git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrBackendEffectFactory.h2
-rw-r--r--include/gpu/GrColor.h12
-rw-r--r--include/gpu/GrConfig.h5
-rw-r--r--include/gpu/GrContext.h12
-rw-r--r--include/gpu/GrDrawEffect.h4
-rw-r--r--include/gpu/GrEffect.h10
-rw-r--r--include/gpu/GrEffectStage.h14
-rw-r--r--include/gpu/GrPaint.h4
-rw-r--r--include/gpu/GrRenderTarget.h2
-rw-r--r--include/gpu/GrResource.h4
-rw-r--r--include/gpu/GrSurface.h4
-rw-r--r--include/gpu/GrTBackendEffectFactory.h8
-rw-r--r--include/gpu/GrTexture.h4
-rw-r--r--include/gpu/GrTextureAccess.h2
-rw-r--r--include/gpu/GrTypes.h14
-rw-r--r--include/gpu/GrTypesPriv.h10
-rw-r--r--include/gpu/gl/GrGLExtensions.h2
-rw-r--r--include/gpu/gl/SkGLContextHelper.h2
18 files changed, 57 insertions, 58 deletions
diff --git a/include/gpu/GrBackendEffectFactory.h b/include/gpu/GrBackendEffectFactory.h
index 28114436de..6a18169de0 100644
--- a/include/gpu/GrBackendEffectFactory.h
+++ b/include/gpu/GrBackendEffectFactory.h
@@ -73,7 +73,7 @@ protected:
// atomic inc returns the old value not the incremented value. So we add
// 1 to the returned value.
int32_t id = sk_atomic_inc(&fCurrEffectClassID) + 1;
- GrAssert(id < (1 << kClassIDBits));
+ SkASSERT(id < (1 << kClassIDBits));
return static_cast<EffectKey>(id);
}
diff --git a/include/gpu/GrColor.h b/include/gpu/GrColor.h
index 3ded8fbe01..cf7e7df843 100644
--- a/include/gpu/GrColor.h
+++ b/include/gpu/GrColor.h
@@ -35,10 +35,10 @@ typedef uint32_t GrColor;
*/
static inline GrColor GrColorPackRGBA(unsigned r, unsigned g,
unsigned b, unsigned a) {
- GrAssert((uint8_t)r == r);
- GrAssert((uint8_t)g == g);
- GrAssert((uint8_t)b == b);
- GrAssert((uint8_t)a == a);
+ SkASSERT((uint8_t)r == r);
+ SkASSERT((uint8_t)g == g);
+ SkASSERT((uint8_t)b == b);
+ SkASSERT((uint8_t)a == a);
return (r << GrColor_SHIFT_R) |
(g << GrColor_SHIFT_G) |
(b << GrColor_SHIFT_B) |
@@ -85,7 +85,7 @@ enum GrColorComponentFlags {
};
static inline char GrColorComponentFlagToChar(GrColorComponentFlags component) {
- GrAssert(GrIsPow2(component));
+ SkASSERT(GrIsPow2(component));
switch (component) {
case kR_GrColorComponentFlag:
return 'r';
@@ -102,7 +102,7 @@ static inline char GrColorComponentFlagToChar(GrColorComponentFlags component) {
}
static inline uint32_t GrPixelConfigComponentMask(GrPixelConfig config) {
- GrAssert(config >= 0 && config < kGrPixelConfigCnt);
+ SkASSERT(config >= 0 && config < kGrPixelConfigCnt);
static const uint32_t kFlags[] = {
0, // kUnknown_GrPixelConfig
kA_GrColorComponentFlag, // kAlpha_8_GrPixelConfig
diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h
index 95e518ab75..df53fa2ceb 100644
--- a/include/gpu/GrConfig.h
+++ b/include/gpu/GrConfig.h
@@ -276,7 +276,6 @@ typedef unsigned __int64 uint64_t;
/**
* Prettier forms of the above macros.
*/
-#define GrAssert(COND) GR_DEBUGASSERT(COND)
#define GrAlwaysAssert(COND) GR_ALWAYSASSERT(COND)
/**
@@ -285,8 +284,8 @@ typedef unsigned __int64 uint64_t;
*/
inline void GrCrash() { GrAlwaysAssert(false); }
inline void GrCrash(const char* msg) { GrPrintf(msg); GrAlwaysAssert(false); }
-inline void GrDebugCrash() { GrAssert(false); }
-inline void GrDebugCrash(const char* msg) { GrPrintf(msg); GrAssert(false); }
+inline void GrDebugCrash() { SkASSERT(false); }
+inline void GrDebugCrash(const char* msg) { GrPrintf(msg); SkASSERT(false); }
/**
* GR_DEBUGCODE compiles the code X in debug builds only
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 13df5ce3ed..759c7e4aee 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -678,7 +678,7 @@ public:
* Initializes by pre-concat'ing the context's current matrix with the preConcat param.
*/
void setPreConcat(GrContext* context, const SkMatrix& preConcat, GrPaint* paint = NULL) {
- GrAssert(NULL != context);
+ SkASSERT(NULL != context);
this->restore();
@@ -692,7 +692,7 @@ public:
* update a paint but the matrix cannot be inverted.
*/
bool setIdentity(GrContext* context, GrPaint* paint = NULL) {
- GrAssert(NULL != context);
+ SkASSERT(NULL != context);
this->restore();
@@ -772,7 +772,7 @@ public:
AutoClip(GrContext* context, InitialClip initialState)
: fContext(context) {
- GrAssert(kWideOpen_InitialClip == initialState);
+ SkASSERT(kWideOpen_InitialClip == initialState);
fNewClipData.fClipStack = &fNewClipStack;
fOldClip = context->getClip();
@@ -808,7 +808,7 @@ public:
, fAutoRT(ctx, rt) {
fAutoMatrix.setIdentity(ctx);
// should never fail with no paint param.
- GrAssert(fAutoMatrix.succeeded());
+ SkASSERT(fAutoMatrix.succeeded());
}
private:
@@ -987,10 +987,10 @@ public:
// The cache also has a ref which we are lending to the caller of detach(). When the caller
// lets go of the ref and the ref count goes to 0 internal_dispose will see this flag is
// set and re-ref the texture, thereby restoring the cache's ref.
- GrAssert(texture->getRefCnt() > 1);
+ SkASSERT(texture->getRefCnt() > 1);
texture->setFlag((GrTextureFlags) GrTexture::kReturnToCache_FlagBit);
texture->unref();
- GrAssert(NULL != texture->getCacheEntry());
+ SkASSERT(NULL != texture->getCacheEntry());
return texture;
}
diff --git a/include/gpu/GrDrawEffect.h b/include/gpu/GrDrawEffect.h
index 005de417ee..8dae646536 100644
--- a/include/gpu/GrDrawEffect.h
+++ b/include/gpu/GrDrawEffect.h
@@ -22,8 +22,8 @@ public:
GrDrawEffect(const GrEffectStage& stage, bool explicitLocalCoords)
: fEffectStage(&stage)
, fExplicitLocalCoords(explicitLocalCoords) {
- GrAssert(NULL != fEffectStage);
- GrAssert(NULL != fEffectStage->getEffect());
+ SkASSERT(NULL != fEffectStage);
+ SkASSERT(NULL != fEffectStage->getEffect());
}
const GrEffectRef* effect() const { return fEffectStage->getEffect(); }
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index 20dc5dadc7..d8757b2ced 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -167,7 +167,7 @@ public:
/** Useful for effects that want to insert a texture matrix that is implied by the texture
dimensions */
static inline SkMatrix MakeDivByTextureWHMatrix(const GrTexture* texture) {
- GrAssert(NULL != texture);
+ SkASSERT(NULL != texture);
SkMatrix mat;
mat.setIDiv(texture->width(), texture->height());
return mat;
@@ -235,7 +235,7 @@ protected:
/** Used by GR_CREATE_STATIC_EFFECT below */
static GrEffectRef* CreateStaticEffectRef(void* refStorage, GrEffect* effect) {
- GrAssert(NULL == effect->fEffectRef);
+ SkASSERT(NULL == effect->fEffectRef);
effect->fEffectRef = SkNEW_PLACEMENT_ARGS(refStorage, GrEffectRef, (effect));
return effect->fEffectRef;
}
@@ -289,9 +289,9 @@ private:
bool result = this->onIsEqual(other);
#if GR_DEBUG
if (result) {
- GrAssert(this->numTextures() == other.numTextures());
+ SkASSERT(this->numTextures() == other.numTextures());
for (int i = 0; i < this->numTextures(); ++i) {
- GrAssert(*fTextureAccesses[i] == *other.fTextureAccesses[i]);
+ SkASSERT(*fTextureAccesses[i] == *other.fTextureAccesses[i]);
}
}
#endif
@@ -320,7 +320,7 @@ private:
};
inline GrEffectRef::GrEffectRef(GrEffect* effect) {
- GrAssert(NULL != effect);
+ SkASSERT(NULL != effect);
effect->ref();
fEffect = effect;
}
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
index 08fb159260..561a7890f5 100644
--- a/include/gpu/GrEffectStage.h
+++ b/include/gpu/GrEffectStage.h
@@ -48,8 +48,8 @@ public:
}
bool operator== (const GrEffectStage& other) const {
- GrAssert(NULL != fEffectRef.get());
- GrAssert(NULL != other.fEffectRef.get());
+ SkASSERT(NULL != fEffectRef.get());
+ SkASSERT(NULL != other.fEffectRef.get());
if (!(*this->getEffect())->isEqual(*other.getEffect())) {
return false;
@@ -103,7 +103,7 @@ public:
if (fCoordChangeMatrixSet) {
savedCoordChange->fCoordChangeMatrix = fCoordChangeMatrix;
}
- GrAssert(NULL == savedCoordChange->fEffectRef.get());
+ SkASSERT(NULL == savedCoordChange->fEffectRef.get());
GR_DEBUGCODE(SkRef(fEffectRef.get());)
GR_DEBUGCODE(savedCoordChange->fEffectRef.reset(fEffectRef.get());)
}
@@ -116,7 +116,7 @@ public:
if (fCoordChangeMatrixSet) {
fCoordChangeMatrix = savedCoordChange.fCoordChangeMatrix;
}
- GrAssert(savedCoordChange.fEffectRef.get() == fEffectRef);
+ SkASSERT(savedCoordChange.fEffectRef.get() == fEffectRef);
GR_DEBUGCODE(savedCoordChange.fEffectRef.reset(NULL);)
}
@@ -137,8 +137,8 @@ public:
}
void saveFrom(const GrEffectStage& stage) {
- GrAssert(!fInitialized);
- GrAssert(NULL != stage.fEffectRef.get());
+ SkASSERT(!fInitialized);
+ SkASSERT(NULL != stage.fEffectRef.get());
stage.fEffectRef->get()->incDeferredRefCounts();
fEffect = stage.fEffectRef->get();
fCoordChangeMatrixSet = stage.fCoordChangeMatrixSet;
@@ -151,7 +151,7 @@ public:
}
void restoreTo(GrEffectStage* stage) const {
- GrAssert(fInitialized);
+ SkASSERT(fInitialized);
stage->fEffectRef.reset(GrEffect::CreateEffectRef(fEffect));
stage->fCoordChangeMatrixSet = fCoordChangeMatrixSet;
if (fCoordChangeMatrixSet) {
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 59343e70ec..25557f9b9a 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -109,7 +109,7 @@ public:
* Appends an additional color effect to the color computation.
*/
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;
}
@@ -118,7 +118,7 @@ public:
* Appends an additional coverage effect to the coverage computation.
*/
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;
}
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index eab65b5b1d..f43aba9d58 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -156,7 +156,7 @@ private:
friend class GrTexture;
// called by ~GrTexture to remove the non-ref'ed back ptr.
void owningTextureDestroyed() {
- GrAssert(NULL != fTexture);
+ SkASSERT(NULL != fTexture);
fTexture = NULL;
}
diff --git a/include/gpu/GrResource.h b/include/gpu/GrResource.h
index 72e6928b2b..61a089ed47 100644
--- a/include/gpu/GrResource.h
+++ b/include/gpu/GrResource.h
@@ -69,8 +69,8 @@ public:
void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; }
GrResourceEntry* getCacheEntry() { return fCacheEntry; }
- void incDeferredRefCount() const { GrAssert(fDeferredRefCount >= 0); ++fDeferredRefCount; }
- void decDeferredRefCount() const { GrAssert(fDeferredRefCount > 0); --fDeferredRefCount; }
+ void incDeferredRefCount() const { SkASSERT(fDeferredRefCount >= 0); ++fDeferredRefCount; }
+ void decDeferredRefCount() const { SkASSERT(fDeferredRefCount > 0); --fDeferredRefCount; }
protected:
/**
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h
index eeb63ad21b..3aa498b611 100644
--- a/include/gpu/GrSurface.h
+++ b/include/gpu/GrSurface.h
@@ -41,7 +41,7 @@ public:
SkIntToScalar(this->height())); }
GrSurfaceOrigin origin() const {
- GrAssert(kTopLeft_GrSurfaceOrigin == fDesc.fOrigin || kBottomLeft_GrSurfaceOrigin == fDesc.fOrigin);
+ SkASSERT(kTopLeft_GrSurfaceOrigin == fDesc.fOrigin || kBottomLeft_GrSurfaceOrigin == fDesc.fOrigin);
return fDesc.fOrigin;
}
@@ -81,7 +81,7 @@ public:
return thisRT == other->asRenderTarget();
} else {
const GrTexture* thisTex = this->asTexture();
- GrAssert(NULL != thisTex); // We must be one or the other
+ SkASSERT(NULL != thisTex); // We must be one or the other
return thisTex == other->asTexture();
}
}
diff --git a/include/gpu/GrTBackendEffectFactory.h b/include/gpu/GrTBackendEffectFactory.h
index 813f54b797..87ace756ec 100644
--- a/include/gpu/GrTBackendEffectFactory.h
+++ b/include/gpu/GrTBackendEffectFactory.h
@@ -32,19 +32,19 @@ public:
GLSL code generation. */
virtual EffectKey glEffectKey(const GrDrawEffect& drawEffect,
const GrGLCaps& caps) const SK_OVERRIDE {
- GrAssert(kIllegalEffectClassID != fEffectClassID);
+ SkASSERT(kIllegalEffectClassID != fEffectClassID);
EffectKey effectKey = GLEffect::GenKey(drawEffect, caps);
EffectKey textureKey = GLEffect::GenTextureKey(drawEffect, caps);
EffectKey attribKey = GLEffect::GenAttribKey(drawEffect);
#if GR_DEBUG
static const EffectKey kIllegalIDMask = (uint16_t) (~((1U << kEffectKeyBits) - 1));
- GrAssert(!(kIllegalIDMask & effectKey));
+ SkASSERT(!(kIllegalIDMask & effectKey));
static const EffectKey kIllegalTextureKeyMask = (uint16_t) (~((1U << kTextureKeyBits) - 1));
- GrAssert(!(kIllegalTextureKeyMask & textureKey));
+ SkASSERT(!(kIllegalTextureKeyMask & textureKey));
static const EffectKey kIllegalAttribKeyMask = (uint16_t) (~((1U << kAttribKeyBits) - 1));
- GrAssert(!(kIllegalAttribKeyMask & textureKey));
+ SkASSERT(!(kIllegalAttribKeyMask & textureKey));
#endif
return fEffectClassID | (attribKey << (kEffectKeyBits+kTextureKeyBits)) |
(textureKey << kEffectKeyBits) | effectKey;
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index 1fb575ca59..f1c855dc4b 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -100,11 +100,11 @@ public:
* only.
*/
GrFixed normalizeFixedX(GrFixed x) const {
- GrAssert(GrIsPow2(fDesc.fWidth));
+ SkASSERT(GrIsPow2(fDesc.fWidth));
return x >> fShiftFixedX;
}
GrFixed normalizeFixedY(GrFixed y) const {
- GrAssert(GrIsPow2(fDesc.fHeight));
+ SkASSERT(GrIsPow2(fDesc.fHeight));
return y >> fShiftFixedY;
}
diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
index 8100b7a2eb..e3ab79fdf6 100644
--- a/include/gpu/GrTextureAccess.h
+++ b/include/gpu/GrTextureAccess.h
@@ -151,7 +151,7 @@ public:
bool operator== (const GrTextureAccess& other) const {
#if GR_DEBUG
// below assumes all chars in fSwizzle are initialized even if string is < 4 chars long.
- GrAssert(memcmp(fSwizzle, other.fSwizzle, sizeof(fSwizzle)-1) ==
+ SkASSERT(memcmp(fSwizzle, other.fSwizzle, sizeof(fSwizzle)-1) ==
strcmp(fSwizzle, other.fSwizzle));
#endif
return fParams == other.fParams &&
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 18aedc5e89..3a52804be9 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -74,7 +74,7 @@ template <typename T> const T& GrMax(const T& a, const T& b) {
* divide, rounding up
*/
static inline int32_t GrIDivRoundUp(int x, int y) {
- GrAssert(y > 0);
+ SkASSERT(y > 0);
return (x + (y-1)) / y;
}
static inline uint32_t GrUIDivRoundUp(uint32_t x, uint32_t y) {
@@ -152,7 +152,7 @@ static inline uint32_t GrNextPow2(uint32_t n) {
}
static inline int GrNextPow2(int n) {
- GrAssert(n >= 0); // this impl only works for non-neg.
+ SkASSERT(n >= 0); // this impl only works for non-neg.
return n ? (1 << (32 - SkCLZ(n - 1))) : 1;
}
@@ -166,7 +166,7 @@ typedef int32_t GrFixed;
#if GR_DEBUG
static inline int16_t GrToS16(intptr_t x) {
- GrAssert((int16_t)x == x);
+ SkASSERT((int16_t)x == x);
return (int16_t)x;
}
@@ -256,7 +256,7 @@ enum GrMaskFormat {
* Return the number of bytes-per-pixel for the specified mask format.
*/
static inline int GrMaskFormatBytesPerPixel(GrMaskFormat format) {
- GrAssert((unsigned)format <= 2);
+ SkASSERT((unsigned)format <= 2);
// kA8 (0) -> 1
// kA565 (1) -> 2
// kA888 (2) -> 4
@@ -472,7 +472,7 @@ public:
* Initialize the cache ID to a domain and key.
*/
GrCacheID(Domain domain, const Key& key) {
- GrAssert(kInvalid_Domain != domain);
+ SkASSERT(kInvalid_Domain != domain);
this->reset(domain, key);
}
@@ -484,8 +484,8 @@ public:
/** Has this been initialized to a valid domain */
bool isValid() const { return kInvalid_Domain != fDomain; }
- const Key& getKey() const { GrAssert(this->isValid()); return fKey; }
- Domain getDomain() const { GrAssert(this->isValid()); return fDomain; }
+ const Key& getKey() const { SkASSERT(this->isValid()); return fKey; }
+ Domain getDomain() const { SkASSERT(this->isValid()); return fDomain; }
/** Creates a new unique ID domain. */
static Domain GenerateDomain();
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h
index 3538f389d4..8888066d4f 100644
--- a/include/gpu/GrTypesPriv.h
+++ b/include/gpu/GrTypesPriv.h
@@ -33,7 +33,7 @@ static const int kGrSLTypeCount = kLast_GrSLType + 1;
* Gets the vector size of the SLType. Returns -1 for void, matrices, and samplers.
*/
static inline int GrSLTypeVectorCount(GrSLType type) {
- GrAssert(type >= 0 && type < static_cast<GrSLType>(kGrSLTypeCount));
+ SkASSERT(type >= 0 && type < static_cast<GrSLType>(kGrSLTypeCount));
static const int kCounts[] = { -1, 1, 2, 3, 4, -1, -1, -1 };
return kCounts[type];
@@ -51,7 +51,7 @@ static inline int GrSLTypeVectorCount(GrSLType type) {
/** Return the type enum for a vector of floats of length n (1..4),
e.g. 1 -> kFloat_GrSLType, 2 -> kVec2_GrSLType, ... */
static inline GrSLType GrSLFloatVectorType(int count) {
- GrAssert(count > 0 && count <= 4);
+ SkASSERT(count > 0 && count <= 4);
return (GrSLType)(count);
GR_STATIC_ASSERT(kFloat_GrSLType == 1);
@@ -78,7 +78,7 @@ static const int kGrVertexAttribTypeCount = kLast_GrVertexAttribType + 1;
* Returns the vector size of the type.
*/
static inline int GrVertexAttribTypeVectorCount(GrVertexAttribType type) {
- GrAssert(type >= 0 && type < kGrVertexAttribTypeCount);
+ SkASSERT(type >= 0 && type < kGrVertexAttribTypeCount);
static const int kCounts[] = { 1, 2, 3, 4, 4 };
return kCounts[type];
@@ -94,7 +94,7 @@ static inline int GrVertexAttribTypeVectorCount(GrVertexAttribType type) {
* Returns the size of the attrib type in bytes.
*/
static inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) {
- GrAssert(type >= 0 && type < kGrVertexAttribTypeCount);
+ SkASSERT(type >= 0 && type < kGrVertexAttribTypeCount);
static const size_t kSizes[] = {
sizeof(float), // kFloat_GrVertexAttribType
2*sizeof(float), // kVec2f_GrVertexAttribType
@@ -136,7 +136,7 @@ static const int kGrFixedFunctionVertexAttribBindingCnt =
kLastFixedFunction_GrVertexAttribBinding + 1;
static inline int GrFixedFunctionVertexAttribVectorCount(GrVertexAttribBinding binding) {
- GrAssert(binding >= 0 && binding < kGrFixedFunctionVertexAttribBindingCnt);
+ SkASSERT(binding >= 0 && binding < kGrFixedFunctionVertexAttribBindingCnt);
static const int kVecCounts[] = { 2, 2, 4, 4 };
return kVecCounts[binding];
diff --git a/include/gpu/gl/GrGLExtensions.h b/include/gpu/gl/GrGLExtensions.h
index f4e950a7ad..ffb673336a 100644
--- a/include/gpu/gl/GrGLExtensions.h
+++ b/include/gpu/gl/GrGLExtensions.h
@@ -20,7 +20,7 @@
class GrGLExtensions {
public:
bool init(GrGLBinding binding, const GrGLInterface* iface) {
- GrAssert(binding & iface->fBindingsExported);
+ SkASSERT(binding & iface->fBindingsExported);
return this->init(binding, iface->fGetString, iface->fGetStringi, iface->fGetIntegerv);
}
/**
diff --git a/include/gpu/gl/SkGLContextHelper.h b/include/gpu/gl/SkGLContextHelper.h
index 386a6958fb..97d416b34a 100644
--- a/include/gpu/gl/SkGLContextHelper.h
+++ b/include/gpu/gl/SkGLContextHelper.h
@@ -35,7 +35,7 @@ public:
virtual void makeCurrent() const = 0;
bool hasExtension(const char* extensionName) const {
- GrAssert(NULL != fGL);
+ SkASSERT(NULL != fGL);
return fExtensions.has(extensionName);
}