summaryrefslogtreecommitdiffstats
path: root/skia/ext
diff options
context:
space:
mode:
Diffstat (limited to 'skia/ext')
-rw-r--r--skia/ext/bitmap_platform_device_mac.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 56150ce..0f77406 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -6,6 +6,7 @@
#include <time.h>
+#include "base/mac_util.h"
#include "base/ref_counted.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/skia/include/core/SkMatrix.h"
@@ -45,8 +46,6 @@ bool Constrain(int available_size, int* position, int *size) {
}
static CGContextRef CGContextForData(void* data, int width, int height) {
- CGColorSpaceRef color_space =
- CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
#define HAS_ARGB_SHIFTS(a, r, g, b) \
(SK_A32_SHIFT == (a) && SK_R32_SHIFT == (r) \
&& SK_G32_SHIFT == (g) && SK_B32_SHIFT == (b))
@@ -55,7 +54,7 @@ static CGContextRef CGContextForData(void* data, int width, int height) {
// recommends these flags for improved CG performance.
CGContextRef context =
CGBitmapContextCreate(data, width, height, 8, width * 4,
- color_space,
+ mac_util::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst |
kCGBitmapByteOrder32Host);
#else
@@ -63,7 +62,6 @@ static CGContextRef CGContextForData(void* data, int width, int height) {
image memory layout match.
#endif
#undef HAS_ARGB_SHIFTS
- CGColorSpaceRelease(color_space);
if (!context)
return NULL;