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

Unified Diff: mojo/skia/ganesh_helpers.h

Issue 1534033002: Improve Ganesh helpers. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-8
Patch Set: rebase Created 4 years, 11 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 | « mojo/skia/ganesh_framebuffer_surface.cc ('k') | mojo/skia/ganesh_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/skia/ganesh_helpers.h
diff --git a/mojo/skia/ganesh_helpers.h b/mojo/skia/ganesh_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..c328f1b4c980f782d3033e37583561fdf37699f6
--- /dev/null
+++ b/mojo/skia/ganesh_helpers.h
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SKIA_GANESH_HELPERS_H_
+#define MOJO_SKIA_GANESH_HELPERS_H_
abarth 2016/01/18 04:18:40 ganesh_helpers.h isn't a great name. It's vague a
+
+#include "base/callback.h"
+#include "mojo/skia/ganesh_context.h"
+#include "skia/ext/refptr.h"
+
+class SkImage;
+
+namespace mojo {
+namespace skia {
+
+// Creates a Skia image from a GL texture.
+// The underlying texture must be kept alive for as long as the SkImage exists.
+// Invokes |release_callback| when the SkImage is deleted.
+::skia::RefPtr<SkImage> CreateImageFromTexture(
+ const GaneshContext::Scope& scope,
+ uint32_t texture_id,
+ uint32_t width,
+ uint32_t height,
+ const base::Closure& release_callback);
+
+} // namespace skia
+} // namespace mojo
+
+#endif // MOJO_SKIA_GANESH_HELPERS_H_
« no previous file with comments | « mojo/skia/ganesh_framebuffer_surface.cc ('k') | mojo/skia/ganesh_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698