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

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: Thread safe reference counting and disposal of shared data (m_data that is) 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..af997c521770c112aff9b3ed4c71f04bdd69f5a1 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h
@@ -27,6 +27,7 @@
#define ImageFrameGenerator_h
#include "SkBitmap.h"
+#include "SkData.h"
scroggo_chromium 2015/12/02 20:15:02 Should this be forward-declared instead? (Blink st
#include "SkSize.h"
#include "SkTypes.h"
#include "platform/PlatformExport.h"
@@ -75,8 +76,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.
scroggo_chromium 2015/12/02 20:15:02 Should this be called refEncodedData also, since i
+ SkData* refSkData();
SkISize getFullSize() const { return m_fullSize; }
@@ -104,7 +106,7 @@ private:
bool decode(size_t index, ImageDecoder**, SkBitmap*);
SkISize m_fullSize;
- ThreadSafeDataTransport m_data;
+ RefPtr<ThreadSafeDataTransport> m_data;
bool m_isMultiFrame;
bool m_decodeFailedAndEmpty;
Vector<bool> m_hasAlpha;

Powered by Google App Engine
This is Rietveld 408576698