| OLD | NEW |
| 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 #include <include/libplatform/libplatform.h> | 10 #include <include/libplatform/libplatform.h> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 DEFINE_string2(infile, i, NULL, "Name of file to load JS from.\n"); | 33 DEFINE_string2(infile, i, NULL, "Name of file to load JS from.\n"); |
| 34 DEFINE_bool(gpu, true, "Use the GPU for rendering."); | 34 DEFINE_bool(gpu, true, "Use the GPU for rendering."); |
| 35 | 35 |
| 36 void application_init() { | 36 void application_init() { |
| 37 SkGraphics::Init(); | 37 SkGraphics::Init(); |
| 38 SkEvent::Init(); | 38 SkEvent::Init(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void application_term() { | 41 void application_term() { |
| 42 SkEvent::Term(); | 42 SkEvent::Term(); |
| 43 SkGraphics::Term(); | |
| 44 } | 43 } |
| 45 | 44 |
| 46 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) | 45 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) |
| 47 : INHERITED(hwnd) | 46 : INHERITED(hwnd) |
| 48 , fJsContext(context) | 47 , fJsContext(context) |
| 49 #if SK_SUPPORT_GPU | 48 #if SK_SUPPORT_GPU |
| 50 , fCurContext(NULL) | 49 , fCurContext(NULL) |
| 51 , fCurIntf(NULL) | 50 , fCurIntf(NULL) |
| 52 , fCurRenderTarget(NULL) | 51 , fCurRenderTarget(NULL) |
| 53 , fCurSurface(NULL) | 52 , fCurSurface(NULL) |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 226 |
| 228 if (!jsContext->initialize()) { | 227 if (!jsContext->initialize()) { |
| 229 printf("Failed to initialize.\n"); | 228 printf("Failed to initialize.\n"); |
| 230 exit(1); | 229 exit(1); |
| 231 } | 230 } |
| 232 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); | 231 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); |
| 233 global->setWindow(win); | 232 global->setWindow(win); |
| 234 | 233 |
| 235 return win; | 234 return win; |
| 236 } | 235 } |
| OLD | NEW |