OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "SkOSWindow_SDL.h" | 7 #include "SkOSWindow_SDL.h" |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 | 9 |
10 #if defined(SK_BUILD_FOR_ANDROID) | 10 #if defined(SK_BUILD_FOR_ANDROID) |
11 #include <GLES/gl.h> | 11 #include <GLES/gl.h> |
12 #else | 12 #elif defined(SK_BUILD_FOR_LINUX) |
13 #include <GL/gl.h> | 13 #include <GL/gl.h> |
| 14 #elif defined(SK_BUILD_FOR_MAC) |
| 15 #include <gl.h> |
14 #endif | 16 #endif |
15 | 17 |
16 const int SCREEN_WIDTH = 640; | 18 const int SCREEN_WIDTH = 640; |
17 const int SCREEN_HEIGHT = 480; | 19 const int SCREEN_HEIGHT = 480; |
18 | 20 |
19 static void handle_error() { | 21 static void handle_error() { |
20 const char* error = SDL_GetError(); | 22 const char* error = SDL_GetError(); |
21 SkDebugf("SDL Error: %s\n", error); | 23 SkDebugf("SDL Error: %s\n", error); |
22 SDL_ClearError(); | 24 SDL_ClearError(); |
23 } | 25 } |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 282 |
281 // Start normal Skia sequence | 283 // Start normal Skia sequence |
282 application_init(); | 284 application_init(); |
283 | 285 |
284 window->loop(); | 286 window->loop(); |
285 | 287 |
286 delete window; | 288 delete window; |
287 application_term(); | 289 application_term(); |
288 return 0; | 290 return 0; |
289 } | 291 } |
OLD | NEW |