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

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

Issue 418653002: Allowing YUV data to be retrieved from the JPEG Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed useless added parameter Created 6 years, 5 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: Source/platform/graphics/ImageFrameGenerator.h
diff --git a/Source/platform/graphics/ImageFrameGenerator.h b/Source/platform/graphics/ImageFrameGenerator.h
index 720b63b8d66a9a6a4e70e92e12e87e24a101c58a..683cf889c335d22b1ace221025a730b5f5e88b7b 100644
--- a/Source/platform/graphics/ImageFrameGenerator.h
+++ b/Source/platform/graphics/ImageFrameGenerator.h
@@ -41,6 +41,7 @@
namespace blink {
+class DecodingBuffers;
class ImageDecoder;
class ScaledImageFragment;
class SharedBuffer;
@@ -73,6 +74,9 @@ public:
// Returns true if decoding was successful.
bool decodeAndScale(const SkImageInfo&, size_t index, void* pixels, size_t rowBytes);
+ // Decodes components directly into the provided memory planes
Peter Kasting 2014/07/23 22:17:37 Nit: Trailing period
sugoi1 2014/07/24 15:48:29 Done.
+ bool decodeAndScale(void* planes[3], size_t rowBytes[3]);
+
void setData(PassRefPtr<SharedBuffer>, bool allDataReceived);
// Creates a new SharedBuffer containing the data received so far.
@@ -85,6 +89,9 @@ public:
// FIXME: Return alpha state for each frame.
bool hasAlpha(size_t);
+ // Returns sizes for the first 3 components of an image (could be RGB, YUV, etc)
+ bool getComponentSizes(SkISize* componentSizes);
Peter Kasting 2014/07/23 22:17:37 Above you pass arrays with sizes, but here you pas
sugoi1 2014/07/24 15:48:29 Done. Used arrays in both cases.
+
private:
class ExternalMemoryAllocator;
friend class ImageFrameGeneratorTest;
@@ -111,6 +118,8 @@ private:
ThreadSafeDataTransport m_data;
bool m_isMultiFrame;
bool m_decodeFailedAndEmpty;
+ bool m_hardwareDecoding;
+ OwnPtr<DecodingBuffers> m_decodingBuffers;
Vector<bool> m_hasAlpha;
size_t m_decodeCount;
OwnPtr<SkBitmap::Allocator> m_discardableAllocator;

Powered by Google App Engine
This is Rietveld 408576698