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

Unified Diff: mojo/skia/ganesh_texture_surface.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
Index: mojo/skia/ganesh_texture_surface.h
diff --git a/mojo/skia/ganesh_texture_surface.h b/mojo/skia/ganesh_texture_surface.h
index cd3b05dc74f5458efa910f0cb84e73eb4cb5b872..3cf4c363c0329da48faff2453ddba48f23b48afa 100644
--- a/mojo/skia/ganesh_texture_surface.h
+++ b/mojo/skia/ganesh_texture_surface.h
@@ -7,12 +7,15 @@
#include <memory>
-#include "mojo/gpu/gl_texture.h"
+#include "base/macros.h"
#include "mojo/skia/ganesh_context.h"
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkSurface.h"
namespace mojo {
+class GLTexture;
+
+namespace skia {
// This class represents an SkSurface backed by a GL texture, which is
// appropriate for use with Ganesh. This is useful for rendering Skia
@@ -20,7 +23,7 @@ namespace mojo {
class GaneshTextureSurface {
public:
// Creates a surface that wraps the specified GL texture.
- GaneshTextureSurface(GaneshContext* context,
+ GaneshTextureSurface(const GaneshContext::Scope& scope,
std::unique_ptr<GLTexture> texture);
~GaneshTextureSurface();
@@ -32,11 +35,12 @@ class GaneshTextureSurface {
private:
std::unique_ptr<GLTexture> texture_;
- skia::RefPtr<SkSurface> surface_;
+ ::skia::RefPtr<SkSurface> surface_;
DISALLOW_COPY_AND_ASSIGN(GaneshTextureSurface);
};
+} // namespace skia
} // namespace mojo
#endif // MOJO_SKIA_GANESH_TEXTURE_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698