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

Unified Diff: examples/ganesh_app/ganesh_app.cc

Issue 728593003: Add a sample app that draws with Ganesh (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Review comments Created 6 years, 1 month 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 | « examples/ganesh_app/DEPS ('k') | examples/ganesh_app/painter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ganesh_app/ganesh_app.cc
diff --git a/examples/surfaces_app/child_gl_app.cc b/examples/ganesh_app/ganesh_app.cc
similarity index 81%
copy from examples/surfaces_app/child_gl_app.cc
copy to examples/ganesh_app/ganesh_app.cc
index 015ffdec158ee1b790dcaee665d81fcb48243e56..0ace2cee4fe417db3a379189ebff1d4078763c62 100644
--- a/examples/surfaces_app/child_gl_app.cc
+++ b/examples/ganesh_app/ganesh_app.cc
@@ -4,7 +4,8 @@
#include "base/macros.h"
#include "base/threading/platform_thread.h"
-#include "examples/surfaces_app/child_gl_impl.h"
+#include "examples/ganesh_app/painter.h"
+#include "examples/surfaces_app/child.mojom.h"
#include "mojo/application/application_runner_chromium.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_connection.h"
@@ -16,10 +17,10 @@
namespace mojo {
namespace examples {
-class ChildGLApp : public ApplicationDelegate, public InterfaceFactory<Child> {
+class GaneshApp : public ApplicationDelegate, public InterfaceFactory<Child> {
public:
- ChildGLApp() {}
- virtual ~ChildGLApp() {}
+ GaneshApp() {}
+ virtual ~GaneshApp() {}
virtual void Initialize(ApplicationImpl* app) override {
surfaces_service_connection_ =
@@ -41,7 +42,7 @@ class ChildGLApp : public ApplicationDelegate, public InterfaceFactory<Child> {
CommandBufferPtr command_buffer;
gpu_service_->CreateOffscreenGLES2Context(GetProxy(&command_buffer));
BindToRequest(
- new ChildGLImpl(surfaces_service_connection_, command_buffer.Pass()),
+ new Painter(surfaces_service_connection_, command_buffer.Pass()),
&request);
}
@@ -49,13 +50,13 @@ class ChildGLApp : public ApplicationDelegate, public InterfaceFactory<Child> {
ApplicationConnection* surfaces_service_connection_;
GpuPtr gpu_service_;
- DISALLOW_COPY_AND_ASSIGN(ChildGLApp);
+ DISALLOW_COPY_AND_ASSIGN(GaneshApp);
};
} // namespace examples
} // namespace mojo
MojoResult MojoMain(MojoHandle shell_handle) {
- mojo::ApplicationRunnerChromium runner(new mojo::examples::ChildGLApp);
+ mojo::ApplicationRunnerChromium runner(new mojo::examples::GaneshApp);
return runner.Run(shell_handle);
}
« no previous file with comments | « examples/ganesh_app/DEPS ('k') | examples/ganesh_app/painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698