aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyphCache.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-09 15:29:32 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-09 15:29:32 +0000
commit4b60dbe661feadc276f911ee6dfc2058e5aea7ca (patch)
tree1a15b0f893fa3584b62e3250508239b0904175d3 /src/core/SkGlyphCache.h
parente1b75b4096c8ba9a569ae33d580806edd3c4a97a (diff)
move failable work outside of constructors for SkGlyphCache and SkScalerContextGDI. If we fail, try to purge everything and try again, in case the failure was from memory/os-resource exhaustion (e.g. out of HDC handles in windows)
BUG= Review URL: https://codereview.chromium.org/18132009 git-svn-id: http://skia.googlecode.com/svn/trunk@9930 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkGlyphCache.h')
-rw-r--r--src/core/SkGlyphCache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 6011eb9173..d203a65f95 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -185,7 +185,8 @@ public:
};
private:
- SkGlyphCache(SkTypeface*, const SkDescriptor*);
+ // we take ownership of the scalercontext
+ SkGlyphCache(SkTypeface*, const SkDescriptor*, SkScalerContext*);
~SkGlyphCache();
enum MetricsType {