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

Unified Diff: third_party/WebKit/Source/platform/testing/ImageDecodeBench.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
diff --git a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
index 9fc57c794207db0f0656bb22664ae52753ff4d17..4ef02ef74e1dbe60c1868871e3dfae3e2aab0fa7 100644
--- a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
+++ b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
@@ -226,7 +226,6 @@
RefPtr<SharedBuffer> packet_data = SharedBuffer::Create();
size_t position = 0;
- size_t next_frame_to_decode = 0;
while (true) {
const char* packet;
size_t length = data->GetSomeData(packet, position);
@@ -236,14 +235,12 @@
position += length;
bool all_data_received = position == data->size();
- size_t frame_count = decoder->FrameCount();
- for (; next_frame_to_decode < frame_count; ++next_frame_to_decode) {
- decoder->SetData(packet_data.Get(), all_data_received);
- ImageFrame* frame = decoder->FrameBufferAtIndex(next_frame_to_decode);
- if (frame->GetStatus() != ImageFrame::kFrameComplete)
+ decoder->SetData(packet_data.Get(), all_data_received);
+
+ int frame_count = decoder->FrameCount();
+ for (int i = 0; i < frame_count; ++i) {
+ if (!decoder->FrameBufferAtIndex(i))
break;
- decoder->SetData(PassRefPtr<SegmentReader>(nullptr), false);
- decoder->ClearCacheExceptFrame(next_frame_to_decode);
}
if (all_data_received || decoder->Failed())
« no previous file with comments | « third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698