OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 9 |
10 #include "HelloWorld.h" | 10 #include "HelloWorld.h" |
11 | 11 |
12 #include "gl/GrGLInterface.h" | 12 #include "gl/GrGLInterface.h" |
13 #include "SkApplication.h" | 13 #include "SkApplication.h" |
14 #include "SkCanvas.h" | 14 #include "SkCanvas.h" |
15 #include "SkGradientShader.h" | 15 #include "SkGradientShader.h" |
16 #include "SkGraphics.h" | 16 #include "SkGraphics.h" |
17 #include "SkGr.h" | 17 #include "SkGr.h" |
18 | 18 |
19 void application_init() { | 19 void application_init() { |
20 SkGraphics::Init(); | 20 SkGraphics::Init(); |
21 SkEvent::Init(); | 21 SkEvent::Init(); |
22 } | 22 } |
23 | 23 |
24 void application_term() { | 24 void application_term() { |
25 SkEvent::Term(); | 25 SkEvent::Term(); |
26 SkGraphics::Term(); | |
27 } | 26 } |
28 | 27 |
29 HelloWorldWindow::HelloWorldWindow(void* hwnd) | 28 HelloWorldWindow::HelloWorldWindow(void* hwnd) |
30 : INHERITED(hwnd) { | 29 : INHERITED(hwnd) { |
31 fType = kGPU_DeviceType; | 30 fType = kGPU_DeviceType; |
32 fRenderTarget = NULL; | 31 fRenderTarget = NULL; |
33 fRotationAngle = 0; | 32 fRotationAngle = 0; |
34 this->setTitle(); | 33 this->setTitle(); |
35 this->setUpBackend(); | 34 this->setUpBackend(); |
36 } | 35 } |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 setUpBackend(); | 183 setUpBackend(); |
185 this->setTitle(); | 184 this->setTitle(); |
186 this->inval(NULL); | 185 this->inval(NULL); |
187 } | 186 } |
188 return true; | 187 return true; |
189 } | 188 } |
190 | 189 |
191 SkOSWindow* create_sk_window(void* hwnd, int , char** ) { | 190 SkOSWindow* create_sk_window(void* hwnd, int , char** ) { |
192 return new HelloWorldWindow(hwnd); | 191 return new HelloWorldWindow(hwnd); |
193 } | 192 } |
OLD | NEW |