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

Unified Diff: src/gpu/gl/GrGLBufferImpl.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.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLBufferImpl.cpp
diff --git a/src/gpu/gl/GrGLBufferImpl.cpp b/src/gpu/gl/GrGLBufferImpl.cpp
index 2dfa9d5d102f19460e510f39027efb805a054c44..787f40fb340a3ecc4f99e54b816365057e0496f4 100644
--- a/src/gpu/gl/GrGLBufferImpl.cpp
+++ b/src/gpu/gl/GrGLBufferImpl.cpp
@@ -44,7 +44,7 @@ void GrGLBufferImpl::release(GrGpuGL* gpu) {
if (GR_GL_ARRAY_BUFFER == fBufferType) {
gpu->notifyVertexBufferDelete(fDesc.fID);
} else {
- GrAssert(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+ SkASSERT(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
gpu->notifyIndexBufferDelete(fDesc.fID);
}
fDesc.fID = 0;
@@ -64,14 +64,14 @@ void GrGLBufferImpl::bind(GrGpuGL* gpu) const {
if (GR_GL_ARRAY_BUFFER == fBufferType) {
gpu->bindVertexBuffer(fDesc.fID);
} else {
- GrAssert(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+ SkASSERT(GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
gpu->bindIndexBufferAndDefaultVertexArray(fDesc.fID);
}
}
void* GrGLBufferImpl::lock(GrGpuGL* gpu) {
VALIDATE();
- GrAssert(!this->isLocked());
+ SkASSERT(!this->isLocked());
if (0 == fDesc.fID) {
fLockPtr = fCPUData;
} else if (gpu->caps()->bufferLockSupport()) {
@@ -90,9 +90,9 @@ void* GrGLBufferImpl::lock(GrGpuGL* gpu) {
void GrGLBufferImpl::unlock(GrGpuGL* gpu) {
VALIDATE();
- GrAssert(this->isLocked());
+ SkASSERT(this->isLocked());
if (0 != fDesc.fID) {
- GrAssert(gpu->caps()->bufferLockSupport());
+ SkASSERT(gpu->caps()->bufferLockSupport());
this->bind(gpu);
GL_CALL(gpu, UnmapBuffer(fBufferType));
}
@@ -105,7 +105,7 @@ bool GrGLBufferImpl::isLocked() const {
}
bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes) {
- GrAssert(!this->isLocked());
+ SkASSERT(!this->isLocked());
VALIDATE();
if (srcSizeInBytes > fDesc.fSizeInBytes) {
return false;
@@ -157,9 +157,9 @@ bool GrGLBufferImpl::updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInB
}
void GrGLBufferImpl::validate() const {
- GrAssert(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
+ SkASSERT(GR_GL_ARRAY_BUFFER == fBufferType || GR_GL_ELEMENT_ARRAY_BUFFER == fBufferType);
// The following assert isn't valid when the buffer has been abandoned:
- // GrAssert((0 == fDesc.fID) == (NULL != fCPUData));
- GrAssert(0 != fDesc.fID || !fDesc.fIsWrapped);
- GrAssert(NULL == fCPUData || NULL == fLockPtr || fCPUData == fLockPtr);
+ // SkASSERT((0 == fDesc.fID) == (NULL != fCPUData));
+ SkASSERT(0 != fDesc.fID || !fDesc.fIsWrapped);
+ SkASSERT(NULL == fCPUData || NULL == fLockPtr || fCPUData == fLockPtr);
}
« no previous file with comments | « src/gpu/gl/GrGLBufferImpl.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698