Index: src/gpu/GrYUVProvider.h |
diff --git a/src/gpu/GrYUVProvider.h b/src/gpu/GrYUVProvider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d9ebb8bc8be1d7179f0d8740116962856cd928df |
--- /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. |
+ */ |
+ |
robertphillips
2015/09/04 15:20:54
GrYUVProvider_DEFINED ?
reed1
2015/09/04 15:31:05
Done.
|
+#ifndef GrYUVScoper_DEFINED |
+#define GrYUVScoper_DEFINED |
+ |
+#include "GrTypes.h" |
+#include "SkImageInfo.h" |
+ |
+class GrContext; |
+class GrTexture; |
+ |
+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 |
+ }; |
+ |
+ virtual bool onGetYUVSizes(SkISize sizes[kPlaneCount]) = 0; |
+ virtual bool onGetYUVPlanes(SkISize sizes[kPlaneCount], void* planes[kPlaneCount], |
+ size_t rowBytes[kPlaneCount], SkYUVColorSpace*) = 0; |
+}; |
+ |
+#endif |