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

Unified Diff: third_party/WebKit/Source/web/ImageDecodeBench.cpp

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert to PassRefPtr in ImageDecoder, helper for setData Created 4 years, 9 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/web/ImageDecodeBench.cpp
diff --git a/third_party/WebKit/Source/web/ImageDecodeBench.cpp b/third_party/WebKit/Source/web/ImageDecodeBench.cpp
index 6c8ecc1aa7af9bdd100705426c395f9ff6a08b29..7341bc853d389a9367e8b87e0209e11bcaca8ef3 100644
--- a/third_party/WebKit/Source/web/ImageDecodeBench.cpp
+++ b/third_party/WebKit/Source/web/ImageDecodeBench.cpp
@@ -23,6 +23,7 @@ http://crbug.com/398235#c103 and http://crbug.com/258324#c5
#include "platform/SharedBuffer.h"
#include "platform/image-decoders/ImageDecoder.h"
+#include "platform/image-decoders/SharedBufferSegmentReader.h"
#include "platform/testing/TestingPlatformSupport.h"
#include "public/platform/Platform.h"
#include "public/web/WebKit.h"
@@ -294,7 +295,7 @@ bool decodeImageData(SharedBuffer* data, bool colorCorrection, size_t packetSize
position += length;
bool allDataReceived = position == data->size();
- decoder->setData(packetData.get(), allDataReceived);
+ decoder->setData(packetData, allDataReceived);
int frameCount = decoder->frameCount();
for (int i = 0; i < frameCount; ++i) {

Powered by Google App Engine
This is Rietveld 408576698