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

Unified Diff: src/gpu/GrAllocator.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/GrAllocPool.cpp ('k') | src/gpu/GrAtlas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAllocator.h
diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h
index dc4c3de281a83ed0a75123c52f6bbcdada568952..4b81f25915b7087fe2330ac2146bfd8f930e81d9 100755
--- a/src/gpu/GrAllocator.h
+++ b/src/gpu/GrAllocator.h
@@ -35,7 +35,7 @@ public:
fItemsPerBlock(itemsPerBlock),
fOwnFirstBlock(NULL == initialBlock),
fCount(0) {
- GrAssert(itemsPerBlock > 0);
+ SkASSERT(itemsPerBlock > 0);
fBlockSize = fItemSize * fItemsPerBlock;
fBlocks.push_back() = initialBlock;
GR_DEBUGCODE(if (!fOwnFirstBlock) {*((char*)initialBlock+fBlockSize-1)='a';} );
@@ -95,7 +95,7 @@ public:
* access last item, only call if count() != 0
*/
void* back() {
- GrAssert(fCount);
+ SkASSERT(fCount);
return (*this)[fCount-1];
}
@@ -103,7 +103,7 @@ public:
* access last item, only call if count() != 0
*/
const void* back() const {
- GrAssert(fCount);
+ SkASSERT(fCount);
return (*this)[fCount-1];
}
@@ -111,7 +111,7 @@ public:
* access item by index.
*/
void* operator[] (int i) {
- GrAssert(i >= 0 && i < fCount);
+ SkASSERT(i >= 0 && i < fCount);
return (char*)fBlocks[i / fItemsPerBlock] +
fItemSize * (i % fItemsPerBlock);
}
@@ -120,7 +120,7 @@ public:
* access item by index.
*/
const void* operator[] (int i) const {
- GrAssert(i >= 0 && i < fCount);
+ SkASSERT(i >= 0 && i < fCount);
return (const char*)fBlocks[i / fItemsPerBlock] +
fItemSize * (i % fItemsPerBlock);
}
@@ -162,14 +162,14 @@ public:
*/
T& push_back() {
void* item = fAllocator.push_back();
- GrAssert(NULL != item);
+ SkASSERT(NULL != item);
SkNEW_PLACEMENT(item, T);
return *(T*)item;
}
T& push_back(const T& t) {
void* item = fAllocator.push_back();
- GrAssert(NULL != item);
+ SkASSERT(NULL != item);
SkNEW_PLACEMENT_ARGS(item, T, (t));
return *(T*)item;
}
« no previous file with comments | « src/gpu/GrAllocPool.cpp ('k') | src/gpu/GrAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698