OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkBenchLogger_DEFINED | 9 #ifndef SkBenchLogger_DEFINED |
10 #define SkBenchLogger_DEFINED | 10 #define SkBenchLogger_DEFINED |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 * if any, taking an SkString as input. | 56 * if any, taking an SkString as input. |
57 */ | 57 */ |
58 void logProgress(const SkString& str) { | 58 void logProgress(const SkString& str) { |
59 this->nativeLogProgress(str.c_str()); | 59 this->nativeLogProgress(str.c_str()); |
60 this->fileWrite(str.c_str(), str.size()); | 60 this->fileWrite(str.c_str(), str.size()); |
61 } | 61 } |
62 | 62 |
63 private: | 63 private: |
64 #ifdef SK_BUILD_FOR_ANDROID | 64 #ifdef SK_BUILD_FOR_ANDROID |
65 void nativeLogError(const char msg[]) { SkDebugf("%s", msg); } | 65 void nativeLogError(const char msg[]) { SkDebugf("%s", msg); } |
66 void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); } | |
67 #else | 66 #else |
68 void nativeLogError(const char msg[]) { fprintf(stderr, "%s", msg); } | 67 void nativeLogError(const char msg[]) { fprintf(stderr, "%s", msg); } |
69 void nativeLogProgress(const char msg[]) { printf("%s", msg); } | |
70 #endif | 68 #endif |
| 69 void nativeLogProgress(const char msg[]) { SkDebugf("%s", msg); } |
71 | 70 |
72 void fileWrite(const char msg[], size_t size); | 71 void fileWrite(const char msg[], size_t size); |
73 | 72 |
74 SkFILEWStream* fFileStream; | 73 SkFILEWStream* fFileStream; |
75 }; | 74 }; |
76 | 75 |
77 #endif // SkBenchLogger_DEFINED | 76 #endif // SkBenchLogger_DEFINED |
OLD | NEW |