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

Unified Diff: include/core/SkImageGenerator.h

Issue 374743003: Skia side RGB to YUV gpu conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Some changes to getYUV8Planes() 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
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | include/core/SkPixelRef.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageGenerator.h
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index 157bfdb0010646cc7e82d70466a2d4bbf9fd2d62..870afbfe80d674e4f40ac5fd73b12f7d1eed336d 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -116,12 +116,23 @@ public:
bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
#endif
+ /**
+ * If planes is NULL, this imagegenerator should output the sizes and return true
+ * if it can efficiently return YUV planar data. If it cannot, it should return false.
+ *
+ * If planes is not NULL, then it should copy the associated Y,U,V data into those planes
+ * of memory supplied by the caller. It should validate that the sizes match what it expected.
+ * If the sizes do not match, it should return false.
+ */
+ bool getYUV8Planes(SkISize* sizes, void* planes);
+
protected:
virtual SkData* onRefEncodedData();
virtual bool onGetInfo(SkImageInfo* info);
virtual bool onGetPixels(const SkImageInfo& info,
void* pixels, size_t rowBytes,
SkPMColor ctable[], int* ctableCount);
+ virtual bool onGetYUV8Planes(SkISize*, void*);
};
#endif // SkImageGenerator_DEFINED
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | include/core/SkPixelRef.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698