| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "mojo/examples/sample_app/gles2_client_impl.h" | 8 #include "mojo/examples/sample_app/gles2_client_impl.h" |
| 9 #include "mojo/public/bindings/lib/bindings_support.h" | |
| 10 #include "mojo/public/bindings/lib/remote_ptr.h" | 9 #include "mojo/public/bindings/lib/remote_ptr.h" |
| 10 #include "mojo/public/environment/environment.h" |
| 11 #include "mojo/public/gles2/gles2.h" | 11 #include "mojo/public/gles2/gles2.h" |
| 12 #include "mojo/public/system/core.h" | 12 #include "mojo/public/system/core.h" |
| 13 #include "mojo/public/system/macros.h" | 13 #include "mojo/public/system/macros.h" |
| 14 #include "mojo/public/utility/environment.h" | |
| 15 #include "mojo/public/utility/run_loop.h" | 14 #include "mojo/public/utility/run_loop.h" |
| 16 #include "mojom/native_viewport.h" | 15 #include "mojom/native_viewport.h" |
| 17 #include "mojom/shell.h" | 16 #include "mojom/shell.h" |
| 18 | 17 |
| 19 #if defined(WIN32) | 18 #if defined(WIN32) |
| 20 #if !defined(CDECL) | 19 #if !defined(CDECL) |
| 21 #define CDECL __cdecl | 20 #define CDECL __cdecl |
| 22 #endif | 21 #endif |
| 23 #define SAMPLE_APP_EXPORT __declspec(dllexport) | 22 #define SAMPLE_APP_EXPORT __declspec(dllexport) |
| 24 #else | 23 #else |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 MojoHandle shell_handle) { | 86 MojoHandle shell_handle) { |
| 88 mojo::Environment env; | 87 mojo::Environment env; |
| 89 mojo::RunLoop loop; | 88 mojo::RunLoop loop; |
| 90 MojoGLES2Initialize(); | 89 MojoGLES2Initialize(); |
| 91 | 90 |
| 92 mojo::examples::SampleApp app( | 91 mojo::examples::SampleApp app( |
| 93 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass()); | 92 mojo::MakeScopedHandle(mojo::MessagePipeHandle(shell_handle)).Pass()); |
| 94 loop.Run(); | 93 loop.Run(); |
| 95 | 94 |
| 96 MojoGLES2Terminate(); | 95 MojoGLES2Terminate(); |
| 97 mojo::BindingsSupport::Set(NULL); | |
| 98 return MOJO_RESULT_OK; | 96 return MOJO_RESULT_OK; |
| 99 } | 97 } |
| OLD | NEW |