Chromium Code Reviews| Index: Source/platform/image-decoders/ImageDecoder.h |
| diff --git a/Source/platform/image-decoders/ImageDecoder.h b/Source/platform/image-decoders/ImageDecoder.h |
| index 2a305c40b8887d342726adac3a3ba8d2fe3e0420..50028ffbd0eaec578e5a77ffaa2c689b24a5a39b 100644 |
| --- a/Source/platform/image-decoders/ImageDecoder.h |
| +++ b/Source/platform/image-decoders/ImageDecoder.h |
| @@ -42,8 +42,8 @@ |
| #if USE(QCMSLIB) |
| #include "qcms.h" |
| #if OS(MACOSX) |
| +#include "public/platform/mac/WebSandboxSupport.h" |
| #include <ApplicationServices/ApplicationServices.h> |
| -#include "wtf/RetainPtr.h" |
| #endif |
| #endif |
| @@ -200,8 +200,8 @@ public: |
| { |
| // FIXME: Add optional ICCv4 support. |
| #if OS(MACOSX) |
| - RetainPtr<CGColorSpaceRef> monitorColorSpace(AdoptCF, CGDisplayCopyColorSpace(CGMainDisplayID())); |
| - CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpace.get())); |
| + CGColorSpaceRef monitorColorSpace = Platform::current()->sandboxSupport()->displayColorSpace(); |
|
Noel Gordon
2014/09/10 08:46:27
As asked on the other review, is this thread-safe?
|
| + CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpace)); |
| if (iccProfile) { |
| size_t length = CFDataGetLength(iccProfile); |
| const unsigned char* systemProfile = CFDataGetBytePtr(iccProfile); |