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

Unified Diff: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h

Issue 1962563002: Fix ImageDecoder::frameIsCompleteAtIndex - fully received instead of decoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review #23 fix - comments. cleanup. Thanks Leon. Created 4 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
Index: third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
index 05fff2ecdc2786020b8829daa16fd3241bf81bc8..69a8aaf984e8660554b4cf33b9a1ebbf6fe0a9c4 100644
--- a/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h
@@ -92,9 +92,13 @@ public:
return m_client->repetitionCount();
}
- bool frameIsCompleteAtIndex(size_t) const override
+ bool frameIsFullyReceivedAtIndex(size_t index) const override
{
- return m_client->status() == ImageFrame::FrameComplete;
+ // All but the last frame are fully received.
+ // For the last frame use base class implementation.
+ if (index < const_cast<MockImageDecoder*>(this)->frameCount() - 1)
Peter Kasting 2016/05/25 01:05:23 Casting away const is really unpleasant. frameCou
aleksandar.stojiljkovic 2016/05/30 16:12:19 Done.
+ return true;
+ return ImageDecoder::frameIsFullyReceivedAtIndex(index);
}
float frameDurationAtIndex(size_t) const override

Powered by Google App Engine
This is Rietveld 408576698