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

Unified Diff: ui/ozone/demo/gl_renderer.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header 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 | « ui/ozone/demo/BUILD.gn ('k') | ui/ozone/demo/gl_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/demo/gl_renderer.h
diff --git a/ui/ozone/demo/gl_renderer.h b/ui/ozone/demo/gl_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..80e556be03a62d37316a9928ae3fac84b52154af
--- /dev/null
+++ b/ui/ozone/demo/gl_renderer.h
@@ -0,0 +1,46 @@
+// Copyright 2014 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 UI_OZONE_DEMO_GL_RENDERER_H_
+#define UI_OZONE_DEMO_GL_RENDERER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "ui/gfx/swap_result.h"
+#include "ui/ozone/demo/renderer_base.h"
+
+namespace gfx {
+class GLContext;
+class GLSurface;
+} // namespace gfx
+
+namespace ui {
+
+class GlRenderer : public RendererBase {
+ public:
+ GlRenderer(gfx::AcceleratedWidget widget, const gfx::Size& size);
+ ~GlRenderer() override;
+
+ void PostRenderFrameTask(gfx::SwapResult result);
+
+ // Renderer:
+ bool Initialize() override;
+
+ protected:
+ virtual void RenderFrame();
+ virtual scoped_refptr<gfx::GLSurface> CreateSurface();
+
+ scoped_refptr<gfx::GLSurface> surface_;
+ scoped_refptr<gfx::GLContext> context_;
+
+ private:
+ base::WeakPtrFactory<GlRenderer> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(GlRenderer);
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_DEMO_GL_RENDERER_H_
« no previous file with comments | « ui/ozone/demo/BUILD.gn ('k') | ui/ozone/demo/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698