| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 | 7 |
| 8 #include "SkLua.h" | 8 #include "SkLua.h" |
| 9 #include "SkGraphics.h" | 9 #include "SkGraphics.h" |
| 10 #include "SkStream.h" | 10 #include "SkStream.h" |
| 11 #include "SkData.h" | 11 #include "SkData.h" |
| 12 #include "SkOSFile.h" | 12 #include "SkOSFile.h" |
| 13 | 13 |
| 14 #include <stdlib.h> |
| 15 |
| 14 extern "C" { | 16 extern "C" { |
| 15 #include "lua.h" | 17 #include "lua.h" |
| 16 #include "lualib.h" | 18 #include "lualib.h" |
| 17 #include "lauxlib.h" | 19 #include "lauxlib.h" |
| 18 } | 20 } |
| 19 | 21 |
| 20 static SkData* read_into_data(const char file[]) { | 22 static SkData* read_into_data(const char file[]) { |
| 21 SkData* data = SkData::NewFromFileName(file); | 23 SkData* data = SkData::NewFromFileName(file); |
| 22 if (!data) { | 24 if (!data) { |
| 23 data = SkData::NewEmpty(); | 25 data = SkData::NewEmpty(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 51 SkSafeUnref(data); | 53 SkSafeUnref(data); |
| 52 } | 54 } |
| 53 return 0; | 55 return 0; |
| 54 } | 56 } |
| 55 | 57 |
| 56 #if !defined SK_BUILD_FOR_IOS | 58 #if !defined SK_BUILD_FOR_IOS |
| 57 int main(int argc, char * const argv[]) { | 59 int main(int argc, char * const argv[]) { |
| 58 return tool_main(argc, (char**) argv); | 60 return tool_main(argc, (char**) argv); |
| 59 } | 61 } |
| 60 #endif | 62 #endif |
| OLD | NEW |