| Index: third_party/WebKit/Source/platform/graphics/Image.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/Image.cpp b/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| index b04a53b2fa22b5d55bdf95964b8b4db1a0fc7630..5e5a23663f39473dc0a82d4a0e44d2fa30ea5874 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Image.cpp
|
| @@ -255,7 +255,7 @@ void Image::drawPattern(GraphicsContext& context,
|
| const FloatSize& repeatSpacing) {
|
| TRACE_EVENT0("skia", "Image::drawPattern");
|
|
|
| - sk_sp<SkImage> image = imageForCurrentFrame();
|
| + sk_sp<SkImage> image = imageForCurrentFrame(context.getColorBehavior());
|
| if (!image)
|
| return;
|
|
|
| @@ -311,14 +311,19 @@ PassRefPtr<Image> Image::imageForDefaultFrame() {
|
| }
|
|
|
| bool Image::isTextureBacked() {
|
| - sk_sp<SkImage> image = imageForCurrentFrame();
|
| + // TODO(ccameron): It should not be necessary to specify color conversion for
|
| + // this query.
|
| + sk_sp<SkImage> image =
|
| + imageForCurrentFrame(ColorBehavior::transformToGlobalTarget());
|
| return image ? image->isTextureBacked() : false;
|
| }
|
|
|
| -bool Image::applyShader(SkPaint& paint, const SkMatrix& localMatrix) {
|
| +bool Image::applyShader(SkPaint& paint,
|
| + const SkMatrix& localMatrix,
|
| + const ColorBehavior& colorBehavior) {
|
| // Default shader impl: attempt to build a shader based on the current frame
|
| // SkImage.
|
| - sk_sp<SkImage> image = imageForCurrentFrame();
|
| + sk_sp<SkImage> image = imageForCurrentFrame(colorBehavior);
|
| if (!image)
|
| return false;
|
|
|
|
|