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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2565323003: Move gif image decoder to SkCodec (Closed)
Patch Set: Explicitly specify move ctor / assignment until required patch lands. Created 3 years, 4 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/image-decoders/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index ea9c01cc0df2a70ca0f9153503aba2c37d9acd7e..ccf76f1fe021bfef1a02ef9a1aa1a5012939f393 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -248,15 +248,6 @@ class PLATFORM_EXPORT ImageDecoder {
// Callers may pass WTF::kNotFound to clear all frames.
// Note: If |frame_buffer_cache_| contains only one frame, it won't be
// cleared. Returns the number of bytes of frame data actually cleared.
- //
- // This is a virtual method because MockImageDecoder needs to override it in
- // order to run the test ImageFrameGeneratorTest::ClearMultiFrameDecode.
- //
- // @TODO Let MockImageDecoder override ImageFrame::ClearFrameBuffer instead,
- // so this method can be made non-virtual. It is used in the test
- // ImageFrameGeneratorTest::ClearMultiFrameDecode. The test needs to
- // be modified since two frames may be kept in cache, instead of
- // always just one, with this ClearCacheExceptFrame implementation.
virtual size_t ClearCacheExceptFrame(size_t);
// If the image has a cursor hot-spot, stores it in the argument
@@ -396,7 +387,9 @@ class PLATFORM_EXPORT ImageDecoder {
// |index| is smaller than |frame_buffer_cache_|.size().
virtual bool FrameStatusSufficientForSuccessors(size_t index) {
DCHECK(index < frame_buffer_cache_.size());
- return frame_buffer_cache_[index].GetStatus() != ImageFrame::kFrameEmpty;
+ ImageFrame::Status frame_status = frame_buffer_cache_[index].GetStatus();
+ return frame_status == ImageFrame::kFramePartial ||
+ frame_status == ImageFrame::kFrameComplete;
}
private:
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/image-decoders/ImageFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698