OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "core/platform/graphics/ImageSource.h" | 33 #include "core/platform/graphics/ImageSource.h" |
34 #include "core/platform/graphics/IntRect.h" | 34 #include "core/platform/graphics/IntRect.h" |
35 #include "core/platform/graphics/skia/NativeImageSkia.h" | 35 #include "core/platform/graphics/skia/NativeImageSkia.h" |
36 #include "wtf/Assertions.h" | 36 #include "wtf/Assertions.h" |
37 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
40 | 40 |
41 #if USE(QCMSLIB) | 41 #if USE(QCMSLIB) |
42 #include "qcms.h" | 42 #include "qcms.h" |
43 #if OS(DARWIN) | 43 #if OS(MACOSX) |
44 #include <ApplicationServices/ApplicationServices.h> | 44 #include <ApplicationServices/ApplicationServices.h> |
45 #include "core/platform/graphics/cg/GraphicsContextCG.h" | 45 #include "core/platform/graphics/cg/GraphicsContextCG.h" |
46 #include "wtf/RetainPtr.h" | 46 #include "wtf/RetainPtr.h" |
47 #endif | 47 #endif |
48 #endif | 48 #endif |
49 | 49 |
50 namespace WebCore { | 50 namespace WebCore { |
51 | 51 |
52 // ImageFrame represents the decoded image data. This buffer is what all | 52 // ImageFrame represents the decoded image data. This buffer is what all |
53 // decoders write a single frame into. | 53 // decoders write a single frame into. |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 #if USE(QCMSLIB) | 351 #if USE(QCMSLIB) |
352 static qcms_profile* qcmsOutputDeviceProfile() | 352 static qcms_profile* qcmsOutputDeviceProfile() |
353 { | 353 { |
354 static qcms_profile* outputDeviceProfile = 0; | 354 static qcms_profile* outputDeviceProfile = 0; |
355 | 355 |
356 static bool qcmsInitialized = false; | 356 static bool qcmsInitialized = false; |
357 if (!qcmsInitialized) { | 357 if (!qcmsInitialized) { |
358 qcmsInitialized = true; | 358 qcmsInitialized = true; |
359 // FIXME: Add optional ICCv4 support. | 359 // FIXME: Add optional ICCv4 support. |
360 #if OS(DARWIN) | 360 #if OS(MACOSX) |
361 RetainPtr<CGColorSpaceRef> monitorColorSpace(AdoptCF, CGDisplayC
opyColorSpace(CGMainDisplayID())); | 361 RetainPtr<CGColorSpaceRef> monitorColorSpace(AdoptCF, CGDisplayC
opyColorSpace(CGMainDisplayID())); |
362 CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpac
e.get())); | 362 CFDataRef iccProfile(CGColorSpaceCopyICCProfile(monitorColorSpac
e.get())); |
363 if (iccProfile) { | 363 if (iccProfile) { |
364 size_t length = CFDataGetLength(iccProfile); | 364 size_t length = CFDataGetLength(iccProfile); |
365 const unsigned char* systemProfile = CFDataGetBytePtr(iccPro
file); | 365 const unsigned char* systemProfile = CFDataGetBytePtr(iccPro
file); |
366 outputDeviceProfile = qcms_profile_from_memory(systemProfile
, length); | 366 outputDeviceProfile = qcms_profile_from_memory(systemProfile
, length); |
367 } | 367 } |
368 #else | 368 #else |
369 // FIXME: add support for multiple monitors. | 369 // FIXME: add support for multiple monitors. |
370 ColorProfile profile; | 370 ColorProfile profile; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 | 459 |
460 IntSize m_size; | 460 IntSize m_size; |
461 bool m_sizeAvailable; | 461 bool m_sizeAvailable; |
462 bool m_isAllDataReceived; | 462 bool m_isAllDataReceived; |
463 bool m_failed; | 463 bool m_failed; |
464 }; | 464 }; |
465 | 465 |
466 } // namespace WebCore | 466 } // namespace WebCore |
467 | 467 |
468 #endif | 468 #endif |
OLD | NEW |