diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkDraw.cpp | 2 | ||||
-rw-r--r-- | src/ports/SkFontHost_android.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 323438b859..1d3263f73e 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -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); diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp index 21ed0b709b..67c78fb87a 100644 --- a/src/ports/SkFontHost_android.cpp +++ b/src/ports/SkFontHost_android.cpp @@ -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; |