| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/UnacceleratedStaticBitmapImage.h" | 5 #include "platform/graphics/UnacceleratedStaticBitmapImage.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkImage.h" | 7 #include "third_party/skia/include/core/SkImage.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 UnacceleratedStaticBitmapImage::~UnacceleratedStaticBitmapImage() {} | 22 UnacceleratedStaticBitmapImage::~UnacceleratedStaticBitmapImage() {} |
| 23 | 23 |
| 24 IntSize UnacceleratedStaticBitmapImage::size() const { | 24 IntSize UnacceleratedStaticBitmapImage::size() const { |
| 25 return IntSize(m_image->width(), m_image->height()); | 25 return IntSize(m_image->width(), m_image->height()); |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool UnacceleratedStaticBitmapImage::currentFrameKnownToBeOpaque(MetadataMode) { | 28 bool UnacceleratedStaticBitmapImage::currentFrameKnownToBeOpaque(MetadataMode) { |
| 29 return m_image->isOpaque(); | 29 return m_image->isOpaque(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void UnacceleratedStaticBitmapImage::draw(SkCanvas* canvas, | 32 void UnacceleratedStaticBitmapImage::draw(PaintCanvas* canvas, |
| 33 const SkPaint& paint, | 33 const PaintFlags& paint, |
| 34 const FloatRect& dstRect, | 34 const FloatRect& dstRect, |
| 35 const FloatRect& srcRect, | 35 const FloatRect& srcRect, |
| 36 RespectImageOrientationEnum, | 36 RespectImageOrientationEnum, |
| 37 ImageClampingMode clampMode, | 37 ImageClampingMode clampMode, |
| 38 const ColorBehavior& colorBehavior) { | 38 const ColorBehavior& colorBehavior) { |
| 39 // TODO(ccameron): This function should not ignore |colorBehavior|. | 39 // TODO(ccameron): This function should not ignore |colorBehavior|. |
| 40 // https://crbug.com/672306 | 40 // https://crbug.com/672306 |
| 41 StaticBitmapImage::drawHelper(canvas, paint, dstRect, srcRect, clampMode, | 41 StaticBitmapImage::drawHelper(canvas, paint, dstRect, srcRect, clampMode, |
| 42 m_image); | 42 m_image); |
| 43 } | 43 } |
| 44 | 44 |
| 45 sk_sp<SkImage> UnacceleratedStaticBitmapImage::imageForCurrentFrame( | 45 sk_sp<SkImage> UnacceleratedStaticBitmapImage::imageForCurrentFrame( |
| 46 const ColorBehavior& colorBehavior) { | 46 const ColorBehavior& colorBehavior) { |
| 47 // TODO(ccameron): This function should not ignore |colorBehavior|. | 47 // TODO(ccameron): This function should not ignore |colorBehavior|. |
| 48 // https://crbug.com/672306 | 48 // https://crbug.com/672306 |
| 49 return m_image; | 49 return m_image; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace blink | 52 } // namespace blink |
| OLD | NEW |