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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageSource.h

Issue 2202473002: DO NOT COMMIT: Experimental removal of encoded image data Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 3 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/ImageSource.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.h b/third_party/WebKit/Source/platform/graphics/ImageSource.h
index e09cbe1651111f3cbb859deca136e6661aae98b3..75ede41a315b5927067b6123b1e850943e6577d5 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageSource.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageSource.h
@@ -70,6 +70,7 @@ public:
// Returns the number of bytes of frame data actually cleared.
size_t clearCacheExceptFrame(size_t);
+ bool clear();
PassRefPtr<SharedBuffer> data();
// Returns false when the decoder layer rejects the data.
bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived);
@@ -97,6 +98,8 @@ public:
// frame has not yet begun to decode.
size_t frameBytesAtIndex(size_t) const;
+ bool isBufferCleared() const { return m_decoder ? m_decoder->isBufferCleared() : false; }
+
private:
std::unique_ptr<DeferredImageDecoder> m_decoder;
};

Powered by Google App Engine
This is Rietveld 408576698