aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fonts
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-07 19:34:16 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-07 19:34:16 +0000
commitc4df655b37aea7097d3007b299de582ba517ef16 (patch)
tree502b830dfac1a6e4b2f1d2bcba50c6d7a68ffa27 /src/fonts
parent2b4e370a2fe00168838e43f5a78ccc3b371609f5 (diff)
Factory methods for heap-allocated SkTypeface objects.
This is part of an effort to ensure that all SkPaint effects can only be allocated on the heap. This patch makes the constructors of SkTypeface and its subclasses non-public and instead provides factory methods for creating these objects on the heap. BUG=skia:2187 R=scroggo@google.com, bungeman@google.com Author: dominikg@chromium.org Review URL: https://codereview.chromium.org/227693003 git-svn-id: http://skia.googlecode.com/svn/trunk@14080 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/fonts')
-rw-r--r--src/fonts/SkFontMgr_fontconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fonts/SkFontMgr_fontconfig.cpp b/src/fonts/SkFontMgr_fontconfig.cpp
index 1d17111b79..226da963d7 100644
--- a/src/fonts/SkFontMgr_fontconfig.cpp
+++ b/src/fonts/SkFontMgr_fontconfig.cpp
@@ -311,7 +311,7 @@ protected:
return NULL;
}
- SkTypeface* face = SkNEW_ARGS(FontConfigTypeface, (style, isFixedWidth, stream));
+ SkTypeface* face = FontConfigTypeface::Create(style, isFixedWidth, stream);
return face;
}