| Index: third_party/WebKit/Source/platform/graphics/ImagePattern.cpp | 
| diff --git a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp | 
| index 584246d45217a8a56b6e7f97b623e6d22ae042d7..c1262e95ff19a16f0cdb9d7064a2190cbe2fc4a5 100644 | 
| --- a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp | 
| +++ b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp | 
| @@ -5,6 +5,8 @@ | 
| #include "config.h" | 
| #include "platform/graphics/ImagePattern.h" | 
|  | 
| +#include "platform/graphics/BitmapImage.h" | 
| +#include "platform/graphics/GraphicsScreen.h" | 
| #include "platform/graphics/Image.h" | 
| #include "platform/graphics/skia/SkiaUtils.h" | 
| #include "third_party/skia/include/core/SkCanvas.h" | 
| @@ -21,8 +23,18 @@ PassRefPtr<ImagePattern> ImagePattern::create(PassRefPtr<Image> image, RepeatMod | 
|  | 
| ImagePattern::ImagePattern(PassRefPtr<Image> image, RepeatMode repeatMode) | 
| : Pattern(repeatMode) | 
| -    , m_tileImage(image->imageForCurrentFrame()) | 
| { | 
| +    // Patterns of tagged images (those that have a color profile) are drawn to sRGB | 
| +    // on supported platforms. Note the only allowed caller is the <canvas> element. | 
| + | 
| +    if (image && imageColorProfilesEnabled() && image->isBitmapImage()) { | 
| +        if (toBitmapImage(image.get())->hasColorProfile()) | 
| +            toBitmapImage(image.get())->notifyDeviceProfile(screenColorProfile(currentScreenId()).get()); | 
| +        RELEASE_ASSERT(!currentScreenId()); // Check the caller is an HTML <canvas>. | 
| +    } | 
| + | 
| +    m_tileImage = image->imageForCurrentFrame(); | 
| + | 
| if (m_tileImage) { | 
| // TODO(fmalita): mechanism to extract the actual SkImageInfo from an SkImage? | 
| const SkImageInfo info = | 
|  |