зеркало из https://github.com/mozilla/moz-skia.git
replacing Gr* with Sk* in SkTArray.h
REVIEW=http://codereview.appspot.com/5447053/ git-svn-id: http://skia.googlecode.com/svn/trunk@2770 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
0e86291512
Коммит
d80a509eb7
|
@ -299,8 +299,8 @@ protected:
|
||||||
|
|
||||||
void init(const T* array, int count,
|
void init(const T* array, int count,
|
||||||
void* preAllocStorage, int preAllocOrReserveCount) {
|
void* preAllocStorage, int preAllocOrReserveCount) {
|
||||||
GrAssert(count >= 0);
|
SkASSERT(count >= 0);
|
||||||
GrAssert(preAllocOrReserveCount >= 0);
|
SkASSERT(preAllocOrReserveCount >= 0);
|
||||||
fCount = count;
|
fCount = count;
|
||||||
fReserveCount = (preAllocOrReserveCount > 0) ?
|
fReserveCount = (preAllocOrReserveCount > 0) ?
|
||||||
preAllocOrReserveCount :
|
preAllocOrReserveCount :
|
||||||
|
@ -311,8 +311,8 @@ protected:
|
||||||
fAllocCount = fReserveCount;
|
fAllocCount = fReserveCount;
|
||||||
fMemArray = preAllocStorage;
|
fMemArray = preAllocStorage;
|
||||||
} else {
|
} else {
|
||||||
fAllocCount = GrMax(fCount, fReserveCount);
|
fAllocCount = SkMax32(fCount, fReserveCount);
|
||||||
fMemArray = GrMalloc(fAllocCount * sizeof(T));
|
fMemArray = sk_malloc_throw(fAllocCount * sizeof(T));
|
||||||
}
|
}
|
||||||
|
|
||||||
SkTArrayExt::copy(this, array);
|
SkTArrayExt::copy(this, array);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче