| Index: Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
|
| diff --git a/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp b/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
|
| index 0959244acb11eb169b4d405d90e8598ac20b1c46..43196c5914eac224ecf979ccf02538f50442a90e 100644
|
| --- a/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
|
| +++ b/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp
|
| @@ -74,7 +74,7 @@ inline uint32_t blendSrcOverDstNonPremultiplied(uint32_t src, uint32_t dst)
|
|
|
| // Returns two point ranges (<left, width> pairs) at row 'canvasY', that belong to 'src' but not 'dst'.
|
| // A point range is empty if the corresponding width is 0.
|
| -inline void findBlendRangeAtRow(const WebCore::IntRect& src, const WebCore::IntRect& dst, int canvasY, int& left1, int& width1, int& left2, int& width2)
|
| +inline void findBlendRangeAtRow(const blink::IntRect& src, const blink::IntRect& dst, int canvasY, int& left1, int& width1, int& left2, int& width2)
|
| {
|
| ASSERT_WITH_SECURITY_IMPLICATION(canvasY >= src.y() && canvasY < src.maxY());
|
| left1 = -1;
|
| @@ -99,31 +99,31 @@ inline void findBlendRangeAtRow(const WebCore::IntRect& src, const WebCore::IntR
|
| }
|
| }
|
|
|
| -void alphaBlendPremultiplied(WebCore::ImageFrame& src, WebCore::ImageFrame& dst, int canvasY, int left, int width)
|
| +void alphaBlendPremultiplied(blink::ImageFrame& src, blink::ImageFrame& dst, int canvasY, int left, int width)
|
| {
|
| for (int x = 0; x < width; ++x) {
|
| int canvasX = left + x;
|
| - WebCore::ImageFrame::PixelData& pixel = *src.getAddr(canvasX, canvasY);
|
| + blink::ImageFrame::PixelData& pixel = *src.getAddr(canvasX, canvasY);
|
| if (SkGetPackedA32(pixel) != 0xff) {
|
| - WebCore::ImageFrame::PixelData prevPixel = *dst.getAddr(canvasX, canvasY);
|
| + blink::ImageFrame::PixelData prevPixel = *dst.getAddr(canvasX, canvasY);
|
| pixel = SkPMSrcOver(pixel, prevPixel);
|
| }
|
| }
|
| }
|
|
|
| -void alphaBlendNonPremultiplied(WebCore::ImageFrame& src, WebCore::ImageFrame& dst, int canvasY, int left, int width)
|
| +void alphaBlendNonPremultiplied(blink::ImageFrame& src, blink::ImageFrame& dst, int canvasY, int left, int width)
|
| {
|
| for (int x = 0; x < width; ++x) {
|
| int canvasX = left + x;
|
| - WebCore::ImageFrame::PixelData& pixel = *src.getAddr(canvasX, canvasY);
|
| + blink::ImageFrame::PixelData& pixel = *src.getAddr(canvasX, canvasY);
|
| if (SkGetPackedA32(pixel) != 0xff) {
|
| - WebCore::ImageFrame::PixelData prevPixel = *dst.getAddr(canvasX, canvasY);
|
| + blink::ImageFrame::PixelData prevPixel = *dst.getAddr(canvasX, canvasY);
|
| pixel = blendSrcOverDstNonPremultiplied(pixel, prevPixel);
|
| }
|
| }
|
| }
|
|
|
| -namespace WebCore {
|
| +namespace blink {
|
|
|
| WEBPImageDecoder::WEBPImageDecoder(ImageSource::AlphaOption alphaOption,
|
| ImageSource::GammaAndColorProfileOption gammaAndColorProfileOption,
|
| @@ -610,4 +610,4 @@ bool WEBPImageDecoder::decode(const uint8_t* dataBytes, size_t dataSize, bool on
|
| }
|
| }
|
|
|
| -} // namespace WebCore
|
| +} // namespace blink
|
|
|