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

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: add enums for planes 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..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
« no previous file with comments | « include/gpu/SkGr.h ('k') | src/gpu/GrYUVProvider.cpp » ('j') | src/gpu/GrYUVProvider.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698