Index: src/gpu/GrYUVProvider.h |
diff --git a/src/gpu/GrYUVProvider.h b/src/gpu/GrYUVProvider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e83ccbee474950c01aaee02c05121aacd28eb14b |
--- /dev/null |
+++ b/src/gpu/GrYUVProvider.h |
@@ -0,0 +1,38 @@ |
+/* |
+ * Copyright 2015 Google Inc. |
+ * |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#ifndef GrYUVProvider_DEFINED |
+#define GrYUVProvider_DEFINED |
+ |
+#include "GrTypes.h" |
+#include "SkImageInfo.h" |
+ |
+class GrContext; |
+class GrTexture; |
+ |
robertphillips
2015/09/08 13:34:35
// This exists b.c. ...
?
reed1
2015/09/08 14:57:22
Done.
|
+class GrYUVProvider { |
+public: |
+ virtual ~GrYUVProvider() {} |
+ |
+ GrTexture* refAsTexture(GrContext*, const GrSurfaceDesc&, bool useCache); |
+ |
+ virtual uint32_t onGetID() = 0; |
+ |
+ enum { |
+ kY_Index = 0, |
+ kU_Index = 1, |
+ kV_Index = 2, |
+ |
+ kPlaneCount = 3 |
+ }; |
+ |
robertphillips
2015/09/08 13:34:35
// returns false when ... ?
reed1
2015/09/08 14:57:22
Done.
|
+ virtual bool onGetYUVSizes(SkISize sizes[kPlaneCount]) = 0; |
+ virtual bool onGetYUVPlanes(SkISize sizes[kPlaneCount], void* planes[kPlaneCount], |
+ size_t rowBytes[kPlaneCount], SkYUVColorSpace*) = 0; |
+}; |
+ |
+#endif |