Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: src/views/sdl/SkOSWindow_SDL.cpp

Issue 1438003004: bring up SDL on windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable sdl Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/views.gyp ('k') | third_party/libsdl/sdl.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « gyp/views.gyp ('k') | third_party/libsdl/sdl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698