From c3a8c5fb385dca5c57f8002e5331360f21c1a61f Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Tue, 26 May 2009 13:27:48 +0000 Subject: create offscreen surface so we can set its RGB ordering to match our internals git-svn-id: http://skia.googlecode.com/svn/trunk@187 2bbb7eff-a529-9590-31e7-b0007b416f81 --- xcode/sampleapp_sdl/skia_sdl_main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'xcode/sampleapp_sdl') diff --git a/xcode/sampleapp_sdl/skia_sdl_main.cpp b/xcode/sampleapp_sdl/skia_sdl_main.cpp index e54d34046d..1e42c2d39b 100644 --- a/xcode/sampleapp_sdl/skia_sdl_main.cpp +++ b/xcode/sampleapp_sdl/skia_sdl_main.cpp @@ -15,10 +15,13 @@ #include "SkApplication.h" #include "SkWindow.h" +#define WINDOW_WIDTH 800 +#define WINDOW_HEIGHT 600 + int main(int argc, char *argv[]) { Uint32 initflags = SDL_INIT_VIDEO | SDL_INIT_TIMER; SDL_Surface *screen; - Uint8 video_bpp = 0; + Uint8 video_bpp = 32; Uint32 videoflags = SDL_SWSURFACE; SDL_Event event; @@ -30,14 +33,13 @@ int main(int argc, char *argv[]) { } /* Set 640x480 video mode */ - screen=SDL_SetVideoMode(640,480, video_bpp, videoflags); - if (screen == NULL) { - fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n", - video_bpp, SDL_GetError()); + screen=SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT, video_bpp, videoflags); + if (screen == NULL) { + fprintf(stderr, "Couldn't set video mode: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } - + application_init(); SkOSWindow* skwin = create_sk_window(screen); -- cgit v1.2.3