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

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

Issue 1484853003: Ganesh: images upload to GPU performance fix (skip copying encoded data) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrishtr@ and scroggo@'s comments processing - simplify erroneus setData handling Created 5 years 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/ImageFrameGenerator.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
index 39d3c40b00713a5849d327db5aa0bc9b17454317..c8a5809f189aca8688282025a8ff77a827ef09ae 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -39,6 +39,8 @@
#include "wtf/ThreadSafeRefCounted.h"
#include "wtf/Vector.h"
+class SkData;
+
namespace blink {
class ImageDecoder;
@@ -75,8 +77,9 @@ public:
void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
- // Creates a new SharedBuffer containing the data received so far.
- void copyData(RefPtr<SharedBuffer>*, bool* allDataReceived);
+ // Returns pointer to SkData. Caller needs to unref it, according to contract in
+ // SkImageGenerator::refEncodedData.
+ SkData* refEncodedData();
scroggo 2015/12/03 14:59:59 Can this be const?
aleksandar.stojiljkovic 2015/12/03 21:17:09 Done.
SkISize getFullSize() const { return m_fullSize; }
@@ -104,7 +107,7 @@ private:
bool decode(size_t index, ImageDecoder**, SkBitmap*);
SkISize m_fullSize;
- ThreadSafeDataTransport m_data;
+ RefPtr<ThreadSafeDataTransport> m_data;
chrishtr 2015/12/03 17:51:51 What does making this a RefPtr achieve?
aleksandar.stojiljkovic 2015/12/03 21:17:09 Done.
bool m_isMultiFrame;
bool m_decodeFailedAndEmpty;
Vector<bool> m_hasAlpha;

Powered by Google App Engine
This is Rietveld 408576698