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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageDecodingStoreTest.cpp

Issue 2878363003: Revert of Fix ImageAnimation constant names after Blink renaming (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void DecoderBeingDestroyed() override { ++decoders_destroyed_; } 47 void DecoderBeingDestroyed() override { ++decoders_destroyed_; }
48 48
49 void DecodeRequested() override { 49 void DecodeRequested() override {
50 // Decoder is never used by ImageDecodingStore. 50 // Decoder is never used by ImageDecodingStore.
51 ASSERT_TRUE(false); 51 ASSERT_TRUE(false);
52 } 52 }
53 53
54 ImageFrame::Status GetStatus() override { return ImageFrame::kFramePartial; } 54 ImageFrame::Status GetStatus() override { return ImageFrame::kFramePartial; }
55 55
56 size_t FrameCount() override { return 1; } 56 size_t FrameCount() override { return 1; }
57 int RepetitionCount() const override { return kAnimationNone; } 57 int RepetitionCount() const override { return kCAnimationNone; }
58 float FrameDuration() const override { return 0; } 58 float FrameDuration() const override { return 0; }
59 59
60 protected: 60 protected:
61 void EvictOneCache() { 61 void EvictOneCache() {
62 size_t memory_usage_in_bytes = 62 size_t memory_usage_in_bytes =
63 ImageDecodingStore::Instance().MemoryUsageInBytes(); 63 ImageDecodingStore::Instance().MemoryUsageInBytes();
64 if (memory_usage_in_bytes) 64 if (memory_usage_in_bytes)
65 ImageDecodingStore::Instance().SetCacheLimitInBytes( 65 ImageDecodingStore::Instance().SetCacheLimitInBytes(
66 memory_usage_in_bytes - 1); 66 memory_usage_in_bytes - 1);
67 else 67 else
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 EXPECT_EQ(ref_decoder, test_decoder); 171 EXPECT_EQ(ref_decoder, test_decoder);
172 ImageDecodingStore::Instance().RemoveDecoder(generator_.Get(), test_decoder); 172 ImageDecodingStore::Instance().RemoveDecoder(generator_.Get(), test_decoder);
173 EXPECT_FALSE(ImageDecodingStore::Instance().CacheEntries()); 173 EXPECT_FALSE(ImageDecodingStore::Instance().CacheEntries());
174 174
175 EXPECT_FALSE(ImageDecodingStore::Instance().LockDecoder( 175 EXPECT_FALSE(ImageDecodingStore::Instance().LockDecoder(
176 generator_.Get(), size, ImageDecoder::kAlphaPremultiplied, 176 generator_.Get(), size, ImageDecoder::kAlphaPremultiplied,
177 &test_decoder)); 177 &test_decoder));
178 } 178 }
179 179
180 } // namespace blink 180 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698