fix ref() in CreateTypeface
fix comment in SkDraw.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@111 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
54043a394e
commit
fb12c3e6ba
@ -934,7 +934,7 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap,
|
||||
c.concat(*fMatrix);
|
||||
|
||||
// We can't call drawBitmap, or we'll infinitely recurse. Instead
|
||||
// we mannually build a shader and draw that into our new mask
|
||||
// we manually build a shader and draw that into our new mask
|
||||
SkPaint tmpPaint;
|
||||
tmpPaint.setFlags(paint.getFlags());
|
||||
SkAutoBitmapShaderInstall install(bitmap, &tmpPaint);
|
||||
|
@ -564,6 +564,8 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
|
||||
tf = find_best_face(gDefaultFamily, style);
|
||||
}
|
||||
|
||||
// we ref(), since the symantic is to return a new instance
|
||||
tf->ref();
|
||||
return tf;
|
||||
}
|
||||
|
||||
@ -576,6 +578,8 @@ bool SkFontHost::ValidFontID(uint32_t fontID)
|
||||
|
||||
SkStream* SkFontHost::OpenStream(uint32_t fontID)
|
||||
{
|
||||
SkAutoMutexAcquire ac(gFamilyMutex);
|
||||
|
||||
FamilyTypeface* tf = (FamilyTypeface*)find_from_uniqueID(fontID);
|
||||
SkStream* stream = tf ? tf->openStream() : NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user