Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp

Issue 2155973002: Save a bitmap copy when advancing to dependent GIF and WebP animation frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +webp. fix test failures. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
index a9415515373e65c5d1fc20ee48124db76ae54da7..c85155be2eb6492b61d2fc7f3e602b16582d3734 100644
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
@@ -129,7 +129,7 @@ void testDecodeAfterReallocatingData(const char* webpFile)
decoder->setData(reallocatedData.get(), true);
for (size_t i = 0; i < frameCount; ++i) {
- const ImageFrame* const frame = decoder->frameBufferAtIndex(i);
+ ImageFrame* frame = decoder->frameBufferAtIndex(i);
Peter Kasting 2016/08/26 19:04:05 Why remove the consts here and on similar lines be
aleksandar.stojiljkovic 2016/08/26 21:53:51 To make it consistent with other places (GIFImageD
Peter Kasting 2016/08/27 04:19:58 Don't worry about that kind of consistency, especi
aleksandar.stojiljkovic 2016/08/28 08:58:31 Done, bitmap() const reverted back .
EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus());
}
}
@@ -205,7 +205,7 @@ uint32_t premultiplyColor(uint32_t c)
return SkPremultiplyARGBInline(SkGetPackedA32(c), SkGetPackedR32(c), SkGetPackedG32(c), SkGetPackedB32(c));
}
-void verifyFramesMatch(const char* webpFile, const ImageFrame* const a, ImageFrame* const b)
+void verifyFramesMatch(const char* webpFile, ImageFrame* a, ImageFrame* b)
Peter Kasting 2016/08/26 19:04:05 Why remove the first const here? (The other two a
{
const SkBitmap& bitmapA = a->bitmap();
const SkBitmap& bitmapB = b->bitmap();
@@ -297,7 +297,7 @@ TEST(AnimatedWebPTests, verifyAnimationParametersTransparentImage)
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) {
- const ImageFrame* const frame = decoder->frameBufferAtIndex(i);
+ ImageFrame* frame = decoder->frameBufferAtIndex(i);
EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus());
EXPECT_EQ(canvasWidth, frame->bitmap().width());
EXPECT_EQ(canvasHeight, frame->bitmap().height());
@@ -340,7 +340,7 @@ TEST(AnimatedWebPTests, verifyAnimationParametersOpaqueFramesTransparentBackgrou
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) {
- const ImageFrame* const frame = decoder->frameBufferAtIndex(i);
+ ImageFrame* frame = decoder->frameBufferAtIndex(i);
EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus());
EXPECT_EQ(canvasWidth, frame->bitmap().width());
EXPECT_EQ(canvasHeight, frame->bitmap().height());
@@ -383,7 +383,7 @@ TEST(AnimatedWebPTests, verifyAnimationParametersBlendOverwrite)
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(frameParameters); ++i) {
- const ImageFrame* const frame = decoder->frameBufferAtIndex(i);
+ ImageFrame* frame = decoder->frameBufferAtIndex(i);
EXPECT_EQ(ImageFrame::FrameComplete, frame->getStatus());
EXPECT_EQ(canvasWidth, frame->bitmap().width());
EXPECT_EQ(canvasHeight, frame->bitmap().height());

Powered by Google App Engine
This is Rietveld 408576698