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(); |
43 } | 44 } |
44 | 45 |
45 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) | 46 SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context) |
46 : INHERITED(hwnd) | 47 : INHERITED(hwnd) |
47 , fJsContext(context) | 48 , fJsContext(context) |
48 #if SK_SUPPORT_GPU | 49 #if SK_SUPPORT_GPU |
49 , fCurContext(NULL) | 50 , fCurContext(NULL) |
50 , fCurIntf(NULL) | 51 , fCurIntf(NULL) |
51 , fCurRenderTarget(NULL) | 52 , fCurRenderTarget(NULL) |
52 , fCurSurface(NULL) | 53 , fCurSurface(NULL) |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 227 |
227 if (!jsContext->initialize()) { | 228 if (!jsContext->initialize()) { |
228 printf("Failed to initialize.\n"); | 229 printf("Failed to initialize.\n"); |
229 exit(1); | 230 exit(1); |
230 } | 231 } |
231 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); | 232 SkV8ExampleWindow* win = new SkV8ExampleWindow(hwnd, jsContext); |
232 global->setWindow(win); | 233 global->setWindow(win); |
233 | 234 |
234 return win; | 235 return win; |
235 } | 236 } |
OLD | NEW |