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

Unified Diff: src/utils/SkImageGeneratorUtils.h

Issue 1302943004: add gm for image->newShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « gyp/utils.gypi ('k') | src/utils/SkImageGeneratorUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkImageGeneratorUtils.h
diff --git a/src/utils/SkImageGeneratorUtils.h b/src/utils/SkImageGeneratorUtils.h
new file mode 100644
index 0000000000000000000000000000000000000000..940d12da0fd8936ca571dce4aaf6835704dcd6b9
--- /dev/null
+++ b/src/utils/SkImageGeneratorUtils.h
@@ -0,0 +1,29 @@
+/*
+ * 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 SkImageGeneratorUtils_DEFINED
+#define SkImageGeneratorUtils_DEFINED
+
+#include "SkImageGenerator.h"
+
+class SkImage;
+
+class SkImageGeneratorUtils {
+public:
+ // Returns a generator of the specified dimensions, but will always fail to return anything
+ static SkImageGenerator* NewEmpty(const SkImageInfo&);
+
+ // If the bitmap is mutable, it will make a copy first
+ static SkImageGenerator* NewFromBitmap(const SkBitmap&);
+
+ // Ref's the provided texture, so it had better be const!
+ static SkImageGenerator* NewFromTexture(GrContext*, GrTexture*);
+
+ static SkImageGenerator* NewFromImage(const SkImage*);
+};
+
+#endif
« no previous file with comments | « gyp/utils.gypi ('k') | src/utils/SkImageGeneratorUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698