OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "public/platform/WebSize.h" | 36 #include "public/platform/WebSize.h" |
37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
38 #include "wtf/PtrUtil.h" | 38 #include "wtf/PtrUtil.h" |
39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
40 #include <memory> | 40 #include <memory> |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
46 const char layoutTestResourcesDir[] = "LayoutTests/fast/images/resources"; | 46 const char layoutTestResourcesDir[] = "LayoutTests/images/resources"; |
47 | 47 |
48 std::unique_ptr<ImageDecoder> createDecoder() { | 48 std::unique_ptr<ImageDecoder> createDecoder() { |
49 return wrapUnique(new GIFImageDecoder(ImageDecoder::AlphaNotPremultiplied, | 49 return wrapUnique(new GIFImageDecoder(ImageDecoder::AlphaNotPremultiplied, |
50 ImageDecoder::ColorSpaceApplied, | 50 ImageDecoder::ColorSpaceApplied, |
51 ImageDecoder::noDecodedImageByteLimit)); | 51 ImageDecoder::noDecodedImageByteLimit)); |
52 } | 52 } |
53 | 53 |
54 void testRepetitionCount(const char* dir, | 54 void testRepetitionCount(const char* dir, |
55 const char* file, | 55 const char* file, |
56 int expectedRepetitionCount) { | 56 int expectedRepetitionCount) { |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 EXPECT_TRUE(premulFrame && | 478 EXPECT_TRUE(premulFrame && |
479 premulFrame->getStatus() == ImageFrame::FrameComplete); | 479 premulFrame->getStatus() == ImageFrame::FrameComplete); |
480 EXPECT_EQ(premulFrame->bitmap().alphaType(), kOpaque_SkAlphaType); | 480 EXPECT_EQ(premulFrame->bitmap().alphaType(), kOpaque_SkAlphaType); |
481 unpremulFrame = unpremulDecoder->frameBufferAtIndex(0); | 481 unpremulFrame = unpremulDecoder->frameBufferAtIndex(0); |
482 EXPECT_TRUE(unpremulFrame && | 482 EXPECT_TRUE(unpremulFrame && |
483 unpremulFrame->getStatus() == ImageFrame::FrameComplete); | 483 unpremulFrame->getStatus() == ImageFrame::FrameComplete); |
484 EXPECT_EQ(unpremulFrame->bitmap().alphaType(), kOpaque_SkAlphaType); | 484 EXPECT_EQ(unpremulFrame->bitmap().alphaType(), kOpaque_SkAlphaType); |
485 } | 485 } |
486 | 486 |
487 } // namespace blink | 487 } // namespace blink |
OLD | NEW |