| 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) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 | 63 |
| 64 fWindow = SDL_CreateWindow("SDL Window", SDL_WINDOWPOS_CENTERED, SDL_WINDOWP
OS_CENTERED, | 64 fWindow = SDL_CreateWindow("SDL Window", SDL_WINDOWPOS_CENTERED, SDL_WINDOWP
OS_CENTERED, |
| 65 dm.w, dm.h, fWindowFlags); | 65 dm.w, dm.h, fWindowFlags); |
| 66 | 66 |
| 67 if (!fWindow) { | 67 if (!fWindow) { |
| 68 handle_error(); | 68 handle_error(); |
| 69 return; | 69 return; |
| 70 } | 70 } |
| 71 this->resize(SkIntToScalar(dm.w), SkIntToScalar(dm.h)); | 71 this->resize(dm.w, dm.h); |
| 72 } | 72 } |
| 73 | 73 |
| 74 SkOSWindow::~SkOSWindow() { | 74 SkOSWindow::~SkOSWindow() { |
| 75 if (fGLContext) { | 75 if (fGLContext) { |
| 76 SDL_GL_DeleteContext(fGLContext); | 76 SDL_GL_DeleteContext(fGLContext); |
| 77 } | 77 } |
| 78 | 78 |
| 79 //Destroy window | 79 //Destroy window |
| 80 SDL_DestroyWindow(fWindow); | 80 SDL_DestroyWindow(fWindow); |
| 81 | 81 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 // Start normal Skia sequence | 283 // Start normal Skia sequence |
| 284 application_init(); | 284 application_init(); |
| 285 | 285 |
| 286 window->loop(); | 286 window->loop(); |
| 287 | 287 |
| 288 delete window; | 288 delete window; |
| 289 application_term(); | 289 application_term(); |
| 290 return 0; | 290 return 0; |
| 291 } | 291 } |
| OLD | NEW |