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

Side by Side Diff: experimental/SkV8Example/SkV8Example.cpp

Issue 118473006: Allow multiple concurrent timers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up Created 7 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 * 7 *
8 */ 8 */
9 #include <v8.h> 9 #include <v8.h>
10 10
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 if (FLAGS_infile.count()) { 303 if (FLAGS_infile.count()) {
304 data.reset(SkData::NewFromFileName(FLAGS_infile[0])); 304 data.reset(SkData::NewFromFileName(FLAGS_infile[0]));
305 script = static_cast<const char*>(data->data()); 305 script = static_cast<const char*>(data->data());
306 } 306 }
307 if (NULL == script) { 307 if (NULL == script) {
308 printf("Could not load file: %s.\n", FLAGS_infile[0]); 308 printf("Could not load file: %s.\n", FLAGS_infile[0]);
309 exit(1); 309 exit(1);
310 } 310 }
311 311
312 if (!global->parseScript(script)) { 312 if (!global->parseScript(script)) {
313 printf("Failed to parse file: %s.\n", FLAGS_infile[0]);
313 exit(1); 314 exit(1);
314 } 315 }
315 316
316 JsCanvas* jsCanvas = new JsCanvas(global); 317 JsCanvas* jsCanvas = new JsCanvas(global);
317 318
318 if (!jsCanvas->initialize()) { 319 if (!jsCanvas->initialize()) {
319 printf("Failed to initialize.\n"); 320 printf("Failed to initialize.\n");
320 exit(1); 321 exit(1);
321 } 322 }
322 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsCanvas); 323 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsCanvas);
323 global->setWindow(win); 324 global->setWindow(win);
324 return win; 325 return win;
325 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698