fix break in setConfig() where we always reset the bitmap
remove use of non-standard ssize_t in SkSfntUtils.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@197 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
6b8cb256e6
commit
9e0c2fcdaf
@ -253,7 +253,9 @@ void SkBitmap::setConfig(Config c, int width, int height, int rowBytes) {
|
|||||||
fBytesPerPixel = (uint8_t)ComputeBytesPerPixel(c);
|
fBytesPerPixel = (uint8_t)ComputeBytesPerPixel(c);
|
||||||
|
|
||||||
SkDEBUGCODE(this->validate();)
|
SkDEBUGCODE(this->validate();)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// if we got here, we had an error, so we reset the bitmap to empty
|
||||||
err:
|
err:
|
||||||
this->reset();
|
this->reset();
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,10 @@ static Sk64 parse_be64(const uint8_t*& p) {
|
|||||||
|
|
||||||
bool SkSfntUtils::ReadTable_head(SkFontID fontID, SkSfntTable_head* head) {
|
bool SkSfntUtils::ReadTable_head(SkFontID fontID, SkSfntTable_head* head) {
|
||||||
static const uint32_t gTag = SkSetFourByteTag('h', 'e', 'a', 'd');
|
static const uint32_t gTag = SkSetFourByteTag('h', 'e', 'a', 'd');
|
||||||
static const ssize_t gSize = 54;
|
static const size_t gSize = 54;
|
||||||
|
|
||||||
uint8_t storage[gSize];
|
uint8_t storage[gSize];
|
||||||
ssize_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
|
size_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
|
||||||
if (size != gSize) {
|
if (size != gSize) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -57,10 +57,10 @@ bool SkSfntUtils::ReadTable_head(SkFontID fontID, SkSfntTable_head* head) {
|
|||||||
|
|
||||||
bool SkSfntUtils::ReadTable_maxp(SkFontID fontID, SkSfntTable_maxp* maxp) {
|
bool SkSfntUtils::ReadTable_maxp(SkFontID fontID, SkSfntTable_maxp* maxp) {
|
||||||
static const uint32_t gTag = SkSetFourByteTag('m', 'a', 'x', 'p');
|
static const uint32_t gTag = SkSetFourByteTag('m', 'a', 'x', 'p');
|
||||||
static const ssize_t gSize = 32;
|
static const size_t gSize = 32;
|
||||||
|
|
||||||
uint8_t storage[gSize];
|
uint8_t storage[gSize];
|
||||||
ssize_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
|
size_t size = SkFontHost::GetTableData(fontID, gTag, 0, gSize, storage);
|
||||||
if (size != gSize) {
|
if (size != gSize) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user