Changeset 120789 in webkit
- Timestamp:
- Jun 19, 2012 7:15:00 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r120644 r120789 1 2012-06-19 Tony Payne <tpayne@chromium.org> 2 3 Add monitor profile support for Win 4 https://bugs.webkit.org/show_bug.cgi?id=88565 5 6 Reviewed by Eric Seidel. 7 8 * chromium/public/Platform.h: 9 (Platform): 10 (WebKit::Platform::screenColorProfile): 11 1 12 2012-06-14 James Robinson <jamesr@chromium.org> 2 13 -
trunk/Source/Platform/chromium/public/Platform.h
r119666 r120789 39 39 #include "WebLocalizedString.h" 40 40 #include "WebString.h" 41 #include "WebVector.h" 41 42 42 43 namespace WebKit { … … 238 239 // sandbox isn't active). 239 240 virtual bool sandboxEnabled() { return false; } 241 242 243 // Screen ------------------------------------------------------------- 244 245 // Supplies the system monitor color profile ("monitor") or a named ICC profile. 246 virtual void screenColorProfile(const WebString& type, WebVector<char>* profile) { } 240 247 241 248 -
trunk/Source/WebCore/ChangeLog
r120783 r120789 1 2012-06-19 Tony Payne <tpayne@chromium.org> 2 3 Add monitor profile support for Win 4 https://bugs.webkit.org/show_bug.cgi?id=88565 5 6 Reviewed by Eric Seidel. 7 8 Tests: fast/images/jpeg-with-color-profile.html 9 fast/images/png-with-color-profile.html. Also covered by numerous 10 layout tests. 11 12 * WebCore.gyp/WebCore.gyp: 13 * platform/PlatformScreen.h: 14 (WebCore): 15 * platform/blackberry/PlatformScreenBlackBerry.cpp: 16 (WebCore::screenColorProfile): 17 (WebCore): 18 * platform/chromium/PlatformScreenChromium.cpp: 19 (WebCore::screenColorProfile): 20 (WebCore): 21 * platform/efl/PlatformScreenEfl.cpp: 22 (WebCore::screenColorProfile): 23 (WebCore): 24 * platform/gtk/PlatformScreenGtk.cpp: 25 (WebCore::screenColorProfile): 26 (WebCore): 27 * platform/image-decoders/ImageDecoder.h: 28 (ImageFrame): 29 (ImageDecoder): 30 (WebCore::ImageDecoder::qcmsOutputDeviceProfile): 31 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: 32 (turboSwizzled): 33 (colorSpaceHasAlpha): 34 1 35 2012-06-19 Erik Arvidsson <arv@chromium.org> 2 36 -
trunk/Source/WebCore/platform/PlatformScreen.h
r106678 r120789 38 38 typedef uint32_t PlatformDisplayID; 39 39 40 typedef WTF::Vector<char> ColorProfile; 41 40 42 namespace WebCore { 41 43 … … 51 53 FloatRect screenRect(Widget*); 52 54 FloatRect screenAvailableRect(Widget*); 55 // type can be "monitor" or the name of a profile such as "sRGB" or "Adobe RGB". 56 void screenColorProfile(Widget*, const String& type, ColorProfile&); 53 57 54 58 #if PLATFORM(MAC) -
trunk/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp
r117724 r120789 65 65 } 66 66 67 void screenColorProfile(Widget*, const String&, ColorProfile&) 68 { 69 notImplemented(); 70 } 71 67 72 } // namespace WebCore -
trunk/Source/WebCore/platform/chromium/PlatformScreenChromium.cpp
r106678 r120789 34 34 #include "IntRect.h" 35 35 #include "PlatformSupport.h" 36 37 #include <public/Platform.h> 36 38 37 39 namespace WebCore { … … 72 74 } 73 75 76 void screenColorProfile(Widget*, const String& type, ColorProfile& toProfile) 77 { 78 // FIXME: Add support for multiple monitors. 79 WebKit::WebVector<char> profile; 80 WebKit::Platform::current()->screenColorProfile(WebKit::WebString(type), &profile); 81 toProfile.append(profile.data(), profile.size()); 82 } 83 74 84 } // namespace WebCore -
trunk/Source/WebCore/platform/efl/PlatformScreenEfl.cpp
r106678 r120789 93 93 } 94 94 95 void screenColorProfile(Widget*, const String&, ColorProfile&) 96 { 97 notImplemented(); 95 98 } 99 100 } -
trunk/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp
r106678 r120789 138 138 } 139 139 140 void screenColorProfile(Widget*, const String&, ColorProfile&) 141 { 142 notImplemented(); 143 } 144 140 145 } // namespace WebCore -
trunk/Source/WebCore/platform/image-decoders/ImageDecoder.h
r120613 r120789 32 32 #include "IntRect.h" 33 33 #include "ImageSource.h" 34 #include "PlatformScreen.h" 34 35 #include "PlatformString.h" 35 36 #include "SharedBuffer.h" … … 45 46 #if USE(QCMSLIB) 46 47 #include "qcms.h" 47 #include <wtf/MainThread.h>48 48 #if OS(DARWIN) 49 49 #include "GraphicsContextCG.h" … … 54 54 55 55 namespace WebCore { 56 57 typedef Vector<char> ColorProfile;58 56 59 57 // ImageFrame represents the decoded image data. This buffer is what all … … 314 312 const unsigned char* systemProfile = CFDataGetBytePtr(iccProfile); 315 313 outputDeviceProfile = qcms_profile_from_memory(systemProfile, length); 316 if (outputDeviceProfile && qcms_profile_is_bogus(outputDeviceProfile)) { 317 qcms_profile_release(outputDeviceProfile); 318 outputDeviceProfile = 0; 319 } 314 } 315 #else 316 // FIXME: add support for multiple monitors. 317 ColorProfile profile; 318 screenColorProfile(0, "monitor", profile); 319 if (!profile.isEmpty()) 320 outputDeviceProfile = qcms_profile_from_memory(profile.data(), profile.size()); 321 #endif 322 if (outputDeviceProfile && qcms_profile_is_bogus(outputDeviceProfile)) { 323 qcms_profile_release(outputDeviceProfile); 324 outputDeviceProfile = 0; 320 325 } 321 326 if (!outputDeviceProfile) 322 327 outputDeviceProfile = qcms_profile_sRGB(); 323 #else324 // FIXME: sRGB profiles don't add much value. Use the user's monitor profile.325 outputDeviceProfile = qcms_profile_sRGB();326 #endif327 // FIXME: Check that the profile is valid. Fallback to sRGB if not?328 328 if (outputDeviceProfile) 329 329 qcms_profile_precache_output_transform(outputDeviceProfile); -
trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm
r106678 r120789 77 77 } 78 78 79 void screenColorProfile(Widget*, const String&, ColorProfile&) 80 { 81 notImplemented(); 82 } 83 79 84 NSScreen *screenForWindow(NSWindow *window) 80 85 { -
trunk/Source/WebCore/platform/qt/PlatformScreenQt.cpp
r119098 r120789 144 144 } 145 145 146 void screenColorProfile(Widget*, const String&, ColorProfile&) 147 { 148 notImplemented(); 149 } 150 146 151 } // namespace WebCore -
trunk/Source/WebCore/platform/win/PlatformScreenWin.cpp
r106678 r120789 119 119 } 120 120 121 void screenColorProfile(Widget*, const String&, ColorProfile&) 122 { 123 notImplemented(); 124 } 125 121 126 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.