| Index: third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| index 6558ebd306ada5416811644b555a875b83923a76..254fb5cf6440c4bb4e3dc1d797b3b5823b8ca129 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp
|
| @@ -264,10 +264,11 @@ void BitmapImage::draw(
|
| const FloatRect& dstRect,
|
| const FloatRect& srcRect,
|
| RespectImageOrientationEnum shouldRespectImageOrientation,
|
| - ImageClampingMode clampMode) {
|
| + ImageClampingMode clampMode,
|
| + const ColorBehavior& colorBehavior) {
|
| TRACE_EVENT0("skia", "BitmapImage::draw");
|
|
|
| - sk_sp<SkImage> image = imageForCurrentFrame();
|
| + sk_sp<SkImage> image = imageForCurrentFrame(colorBehavior);
|
| if (!image)
|
| return; // It's too early and we don't have an image yet.
|
|
|
| @@ -370,11 +371,8 @@ float BitmapImage::frameDurationAtIndex(size_t index) const {
|
| return m_source.frameDurationAtIndex(index);
|
| }
|
|
|
| -sk_sp<SkImage> BitmapImage::imageForCurrentFrame() {
|
| - // TODO(ccameron): Allow the caller of imageForCurrentFrame to specify the
|
| - // the desired ColorBehavior.
|
| - // https://crbug.com/667420
|
| - const ColorBehavior& colorBehavior = m_cachedFrameColorBehavior;
|
| +sk_sp<SkImage> BitmapImage::imageForCurrentFrame(
|
| + const ColorBehavior& colorBehavior) {
|
| return frameAtIndex(currentFrame(), colorBehavior);
|
| }
|
|
|
|
|