summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-10-02 12:41:04 +0100
committerTorne (Richard Coles) <torne@google.com>2013-10-02 12:41:04 +0100
commit60bb96191d0be18f5ca42b714ba862aff03a5807 (patch)
treebcc8e605b5e6e6451b9673531ec53710e0c15d0c
parenta867ea4285ba1619f3461cc0796d3debc69acf22 (diff)
parente41321223e37911fce551cd965cf3a18402cf074 (diff)
downloadsrc-60bb96191d0be18f5ca42b714ba862aff03a5807.tar.gz
Merge from Chromium at DEPS revision 30.0.1599.85
This commit was generated by merge_to_master.py. Change-Id: I788be16de86d204048b826ae91b3dcddce48db52
-rw-r--r--ports/SkFontHost_fontconfig.cpp9
-rw-r--r--utils/SkCanvasStateUtils.cpp4
2 files changed, 12 insertions, 1 deletions
diff --git a/ports/SkFontHost_fontconfig.cpp b/ports/SkFontHost_fontconfig.cpp
index 1625b8aa..423b85eb 100644
--- a/ports/SkFontHost_fontconfig.cpp
+++ b/ports/SkFontHost_fontconfig.cpp
@@ -102,6 +102,15 @@ SkTypeface* FontConfigTypeface::LegacyCreateTypeface(
return NULL;
}
+ // check if we, in fact, already have this. perhaps fontconfig aliased the
+ // requested name to some other name we actually have...
+ rec.fFamilyName = outFamilyName.c_str();
+ rec.fStyle = outStyle;
+ face = SkTypefaceCache::FindByProcAndRef(find_proc, &rec);
+ if (face) {
+ return face;
+ }
+
face = SkNEW_ARGS(FontConfigTypeface, (outStyle, indentity, outFamilyName));
SkTypefaceCache::Add(face, style);
// SkDebugf("add face <%s> <%s> %p [%d]\n", familyName, outFamilyName.c_str(), face, face->getRefCnt());
diff --git a/utils/SkCanvasStateUtils.cpp b/utils/SkCanvasStateUtils.cpp
index cd79a44f..3fd125bf 100644
--- a/utils/SkCanvasStateUtils.cpp
+++ b/utils/SkCanvasStateUtils.cpp
@@ -7,11 +7,13 @@
#include "SkCanvasStateUtils.h"
-#include "SkBitmapDevice.h"
+#include "SkDevice.h"
#include "SkCanvas.h"
#include "SkCanvasStack.h"
#include "SkWriter32.h"
+typedef SkDevice SkBitmapDevice;
+
#define CANVAS_STATE_VERSION 1
/*
* WARNING: The structs below are part of a stable ABI and as such we explicitly