blob: 03a2915adb31b0bd2ab1e5e722c553bcc6330e97 [file] [log] [blame]
epoger@google.com5aab3402012-03-22 15:15:07 +00001/*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
epoger@google.com5aab3402012-03-22 15:15:07 +00007
8#include "SkApplication.h"
9#include "SkEvent.h"
10#include "SkWindow.h"
epoger@google.com5aab3402012-03-22 15:15:07 +000011
epoger@google.com5aab3402012-03-22 15:15:07 +000012int main(int argc, char** argv){
tfarina@chromium.org1b3fea72014-01-11 16:42:10 +000013 SkOSWindow* window = create_sk_window(NULL, argc, argv);
epoger@google.com5aab3402012-03-22 15:15:07 +000014
tfarina@chromium.org1b3fea72014-01-11 16:42:10 +000015 // drain any events that occurred before |window| was assigned.
epoger@google.com5aab3402012-03-22 15:15:07 +000016 while (SkEvent::ProcessEvent());
17
18 // Start normal Skia sequence
19 application_init();
20
tfarina@chromium.org1b3fea72014-01-11 16:42:10 +000021 window->loop();
epoger@google.com5aab3402012-03-22 15:15:07 +000022
tfarina@chromium.org1b3fea72014-01-11 16:42:10 +000023 delete window;
epoger@google.com5aab3402012-03-22 15:15:07 +000024 application_term();
25 return 0;
26}