15aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com/* 25aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * Copyright 2011 Google Inc. 35aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * 45aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * Use of this source code is governed by a BSD-style license that can be 55aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com * found in the LICENSE file. 65aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com */ 75aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 85aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkApplication.h" 95aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkEvent.h" 102ee6982d952faa8fd2aa09dec787bb5157840445mtklein#include "SkGraphics.h" 115aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com#include "SkWindow.h" 125aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 135aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.comint main(int argc, char** argv){ 142ee6982d952faa8fd2aa09dec787bb5157840445mtklein SkGraphics::Init(); 1596fcdcc219d2a0d3579719b84b28bede76efba64halcanary SkOSWindow* window = create_sk_window(nullptr, argc, argv); 165aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 171b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org // drain any events that occurred before |window| was assigned. 185aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com while (SkEvent::ProcessEvent()); 195aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 205aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com // Start normal Skia sequence 215aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com application_init(); 225aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 231b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org window->loop(); 245aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com 251b3fea7172457f26fb8dd72f0ea59eedba920133tfarina@chromium.org delete window; 265aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com application_term(); 275aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com return 0; 285aab34030fa7082e86480889f57f5af1d8b701f4epoger@google.com} 29