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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp

Issue 2454123002: Refactor image decoders to use 'colorSpace' instead of 'colorProfile' (Closed)
Patch Set: More profile -> space Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 24 matching lines...) Expand all
35 #include "wtf/PtrUtil.h" 35 #include "wtf/PtrUtil.h"
36 #include "wtf/Vector.h" 36 #include "wtf/Vector.h"
37 #include <memory> 37 #include <memory>
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class TestImageDecoder : public ImageDecoder { 41 class TestImageDecoder : public ImageDecoder {
42 public: 42 public:
43 TestImageDecoder() 43 TestImageDecoder()
44 : ImageDecoder(AlphaNotPremultiplied, 44 : ImageDecoder(AlphaNotPremultiplied,
45 GammaAndColorProfileApplied, 45 ColorSpaceApplied,
46 noDecodedImageByteLimit) {} 46 noDecodedImageByteLimit) {}
47 47
48 String filenameExtension() const override { return ""; } 48 String filenameExtension() const override { return ""; }
49 49
50 Vector<ImageFrame, 1>& frameBufferCache() { return m_frameBufferCache; } 50 Vector<ImageFrame, 1>& frameBufferCache() { return m_frameBufferCache; }
51 51
52 void resetRequiredPreviousFrames(bool knownOpaque = false) { 52 void resetRequiredPreviousFrames(bool knownOpaque = false) {
53 for (size_t i = 0; i < m_frameBufferCache.size(); ++i) 53 for (size_t i = 0; i < m_frameBufferCache.size(); ++i)
54 m_frameBufferCache[i].setRequiredPreviousFrameIndex( 54 m_frameBufferCache[i].setRequiredPreviousFrameIndex(
55 findRequiredPreviousFrame(i, knownOpaque)); 55 findRequiredPreviousFrame(i, knownOpaque));
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 for (size_t i = 0; i < numFrames; ++i) { 245 for (size_t i = 0; i < numFrames; ++i) {
246 SCOPED_TRACE(testing::Message() << i); 246 SCOPED_TRACE(testing::Message() << i);
247 if (i == 5) 247 if (i == 5)
248 EXPECT_EQ(ImageFrame::FrameComplete, frameBuffers[i].getStatus()); 248 EXPECT_EQ(ImageFrame::FrameComplete, frameBuffers[i].getStatus());
249 else 249 else
250 EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].getStatus()); 250 EXPECT_EQ(ImageFrame::FrameEmpty, frameBuffers[i].getStatus());
251 } 251 }
252 } 252 }
253 253
254 } // namespace blink 254 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698