aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gammatext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/gammatext.cpp')
-rw-r--r--gm/gammatext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp
index bbd2409af8..3e3163ca4a 100644
--- a/gm/gammatext.cpp
+++ b/gm/gammatext.cpp
@@ -47,7 +47,7 @@ static CGContextRef makeCG(const SkBitmap& bm) {
CGContextRef cg = CGBitmapContextCreate(bm.getPixels(), bm.width(), bm.height(),
8, bm.rowBytes(), space, BITMAP_INFO_RGB);
CFRelease(space);
-
+
CGContextSetAllowsFontSubpixelQuantization(cg, false);
CGContextSetShouldSubpixelQuantizeFonts(cg, false);
@@ -185,6 +185,9 @@ protected:
}
x += SkIntToScalar(1024) / SK_ARRAY_COUNT(fg);
}
+#ifdef SK_BUILD_FOR_MAC
+ CGContextRelease(cg);
+#endif
}
private: