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

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

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/webp/WEBPImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
index c9916718cd7b0f0f1f30fb34e0f13b43845e47ee..718ae30f13feb2f3015b47376261f817f1562f86 100644
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h
@@ -30,8 +30,10 @@
#define WEBPImageDecoder_h
#include "platform/image-decoders/ImageDecoder.h"
+#include "third_party/skia/include/core/SkData.h"
#include "webp/decode.h"
#include "webp/demux.h"
+#include "wtf/RefPtr.h"
namespace blink {
@@ -43,7 +45,7 @@ public:
// ImageDecoder:
String filenameExtension() const override { return "webp"; }
- void onSetData(SharedBuffer* data) override;
+ void onSetData(SegmentReader* data) override;
int repetitionCount() const override;
bool frameIsCompleteAtIndex(size_t) const override;
float frameDurationAtIndex(size_t) const override;
@@ -83,6 +85,9 @@ private:
void clear();
void clearDecoder();
+
+ // FIXME: Update libwebp's API so it does not require copying the data on each update.
+ RefPtr<SkData> m_consolidatedData;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698