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

Unified Diff: src/gpu/gl/GrGLCaps.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/GrGLBufferImpl.cpp ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index df8dc09a864aae75094afff22e1084a12f4297c0..f399cd45e382a7a0b89525da5d5f546bf623e765 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -105,7 +105,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS,
&fMaxFragmentUniformVectors);
} else {
- GrAssert(kDesktop_GrGLBinding == binding);
+ SkASSERT(kDesktop_GrGLBinding == binding);
GrGLint max;
GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max);
fMaxFragmentUniformVectors = max / 4;
@@ -130,7 +130,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fBGRAFormatSupport = true;
fBGRAIsInternalFormat = true;
}
- GrAssert(fBGRAFormatSupport ||
+ SkASSERT(fBGRAFormatSupport ||
kSkia8888_GrPixelConfig != kBGRA_8888_GrPixelConfig);
}
@@ -418,7 +418,7 @@ const GrGLCaps::MSAACoverageMode& GrGLCaps::getMSAACoverageMode(int desiredSampl
if (0 == fMSAACoverageModes.count()) {
return kNoneMode;
} else {
- GrAssert(kNone_CoverageAAType != fCoverageAAType);
+ SkASSERT(kNone_CoverageAAType != fCoverageAAType);
int max = (fMSAACoverageModes.end() - 1)->fCoverageSampleCnt;
desiredSampleCount = GrMin(desiredSampleCount, max);
MSAACoverageMode desiredMode = {desiredSampleCount, 0};
@@ -429,7 +429,7 @@ const GrGLCaps::MSAACoverageMode& GrGLCaps::getMSAACoverageMode(int desiredSampl
if (idx < 0) {
idx = ~idx;
}
- GrAssert(idx >= 0 && idx < fMSAACoverageModes.count());
+ SkASSERT(idx >= 0 && idx < fMSAACoverageModes.count());
return fMSAACoverageModes[idx];
}
}
@@ -487,7 +487,7 @@ void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
fStencilFormats.push_back() = gS4;
}
}
- GrAssert(0 == fStencilVerifiedColorConfigs.count());
+ SkASSERT(0 == fStencilVerifiedColorConfigs.count());
fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
}
@@ -497,12 +497,12 @@ void GrGLCaps::markColorConfigAndStencilFormatAsVerified(
#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
return;
#endif
- GrAssert((unsigned)config < (unsigned)kGrPixelConfigCnt);
- GrAssert(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
+ SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
+ SkASSERT(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
int count = fStencilFormats.count();
// we expect a really small number of possible formats so linear search
// should be OK
- GrAssert(count < 16);
+ SkASSERT(count < 16);
for (int i = 0; i < count; ++i) {
if (format.fInternalFormat ==
fStencilFormats[i].fInternalFormat) {
@@ -520,11 +520,11 @@ bool GrGLCaps::isColorConfigAndStencilFormatVerified(
#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
return false;
#endif
- GrAssert((unsigned)config < (unsigned)kGrPixelConfigCnt);
+ SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
int count = fStencilFormats.count();
// we expect a really small number of possible formats so linear search
// should be OK
- GrAssert(count < 16);
+ SkASSERT(count < 16);
for (int i = 0; i < count; ++i) {
if (format.fInternalFormat ==
fStencilFormats[i].fInternalFormat) {
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.cpp ('k') | src/gpu/gl/GrGLCreateNullInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698