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

Unified Diff: src/gpu/GrYUVProvider.h

Issue 1315353006: refactor parts of SkGr.cpp for use by SkImages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix header Created 5 years, 3 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: 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

Powered by Google App Engine
This is Rietveld 408576698