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

Unified Diff: runtime/embedders/openglui/common/vm_glue.cc

Issue 13345002: Cleaned up OpenGLUI samples and added Blasteroids. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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: runtime/embedders/openglui/common/vm_glue.cc
===================================================================
--- runtime/embedders/openglui/common/vm_glue.cc (revision 20700)
+++ runtime/embedders/openglui/common/vm_glue.cc (working copy)
@@ -24,14 +24,16 @@
VMGlue::VMGlue(ISized* surface,
const char* script_path,
const char* extension_script,
- const char* main_script)
+ const char* main_script,
+ int setup_flag)
: surface_(surface),
isolate_(NULL),
initialized_script_(false),
x_(0.0),
y_(0.0),
z_(0.0),
- accelerometer_changed_(false) {
+ accelerometer_changed_(false),
+ setup_flag_(setup_flag) {
LOGI("Creating VMGlue");
if (main_script == NULL) {
main_script = "main.dart";
@@ -207,14 +209,16 @@
// we can eliminate it along with the need for the force parameter.
if (!initialized_script_ || force) {
initialized_script_ = true;
- LOGI("Invoking setup(NULL, %d,%d)", surface_->width(), surface_->height());
+ LOGI("Invoking setup(null, %d,%d,%d)",
+ surface_->width(), surface_->height(), setup_flag_);
Dart_EnterIsolate(isolate_);
Dart_EnterScope();
- Dart_Handle args[3];
+ Dart_Handle args[4];
args[0] = CheckError(Dart_Null());
args[1] = CheckError(Dart_NewInteger(surface_->width()));
args[2] = CheckError(Dart_NewInteger(surface_->height()));
- int rtn = Invoke("setup", 3, args);
+ args[3] = CheckError(Dart_NewInteger(setup_flag_));
+ int rtn = Invoke("setup", 4, args);
if (rtn == 0) {
// Plug in the print handler. It would be nice if we could do this
« no previous file with comments | « runtime/embedders/openglui/common/vm_glue.h ('k') | runtime/embedders/openglui/emulator/emulator_embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698