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 4ef02ef74e1dbe60c1868871e3dfae3e2aab0fa7..14d42f1cdf17b6aac12ae9cb9e3d9dfe7d71af6e 100644 |
--- a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
+++ b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
@@ -226,6 +226,7 @@ bool DecodeImageData(SharedBuffer* data, |
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); |
@@ -238,9 +239,11 @@ bool DecodeImageData(SharedBuffer* data, |
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)) |
+ for (int i = next_frame_to_decode; i < frame_count; ++i) { |
scroggo
2017/05/11 13:56:23
FWIW, starting from frame 0 doesn't re-decode thos
cblume
2017/05/11 15:45:31
Ah. I agree.
Since I believe this test is aimed a
|
+ if (!decoder->FrameBufferAtIndex(i)) { |
+ next_frame_to_decode = i; |
break; |
+ } |
} |
if (all_data_received || decoder->Failed()) |