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

Unified Diff: include/core/SkPixelRef.h

Issue 374743003: Skia side RGB to YUV gpu conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed more comments 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: include/core/SkPixelRef.h
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 263145ba3d90baefabd5552cefed18892fed1c02..d7442cfbd73c04f5fdc91d9ef3f85bf577238985 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -14,6 +14,7 @@
#include "SkString.h"
#include "SkFlattenable.h"
#include "SkImageInfo.h"
+#include "SkSize.h"
#include "SkTDArray.h"
//#define xed
@@ -227,6 +228,18 @@ public:
*/
virtual GrTexture* getTexture() { return NULL; }
+ /**
+ * If any planes or rowBytes is NULL, this should output the sizes and return true
+ * if it can efficiently return YUV planar data. If it cannot, it should return false.
+ *
+ * If all planes and rowBytes are 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.
+ */
+ virtual bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]) {
+ return false;
+ }
+
bool readPixels(SkBitmap* dst, const SkIRect* subset = NULL);
/**

Powered by Google App Engine
This is Rietveld 408576698