Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1774)

Unified Diff: Source/platform/image-decoders/ImageDecoder.h

Issue 554033002: [Mac] Add a new WebSandboxSupport method to get the display's color space. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/platform/mac/WebSandboxSupport.h » ('j') | public/platform/mac/WebSandboxSupport.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d00a68056d24f4e4579c67b5d63a863f86d7e984 100644
--- a/Source/platform/image-decoders/ImageDecoder.h
+++ b/Source/platform/image-decoders/ImageDecoder.h
@@ -42,8 +42,9 @@
#if USE(QCMSLIB)
#include "qcms.h"
#if OS(MACOSX)
-#include <ApplicationServices/ApplicationServices.h>
+#include "public/platform/mac/WebSandboxSupport.h"
#include "wtf/RetainPtr.h"
+#include <ApplicationServices/ApplicationServices.h>
#endif
#endif
@@ -200,8 +201,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();
+ CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpace));
if (iccProfile) {
size_t length = CFDataGetLength(iccProfile);
const unsigned char* systemProfile = CFDataGetBytePtr(iccProfile);
« no previous file with comments | « no previous file | public/platform/mac/WebSandboxSupport.h » ('j') | public/platform/mac/WebSandboxSupport.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698