146 {
148
149 for (
int i = 0;
i < FLAGS_skps.size();
i++) {
151 continue;
152 }
153
156 SkDebugf(
"Could not read %s.\n", FLAGS_skps[
i]);
157 return 1;
158 }
161 SkDebugf(
"Could not read %s as an SkPicture.\n", FLAGS_skps[
i]);
162 return 1;
163 }
166
170
171 if (FLAGS_optimize) {
173 }
174
180
181 printf(
"%s %s\n", FLAGS_optimize ?
"optimized" :
"not-optimized", FLAGS_skps[
i]);
182
184 for (
int j = 0; j < record.
count(); j++) {
185 record.
visit(j, dumper);
186 }
187
188 if (FLAGS_write.size() > 0) {
192 nullptr,
193 nullptr,
194 0,
195 nullptr,
196 nullptr);
202 };
203 dst->serialize(&ostream, &sProcs);
204 }
205 }
206
207 return 0;
208}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void SkRecordDraw(const SkRecord &record, SkCanvas *canvas, SkPicture const *const drawablePicts[], SkDrawable *const drawables[], int drawableCount, const SkBBoxHierarchy *bbh, SkPicture::AbortCallback *callback)
void SkRecordOptimize(SkRecord *record)
#define SkScalarCeilToInt(x)
static bool ShouldSkip(const SkTDArray< const char * > &strings, const char *name)
static void Parse(int argc, const char *const *argv)
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
static sk_sp< SkPicture > MakeFromStream(SkStream *stream, const SkDeserialProcs *procs=nullptr)
auto visit(int i, F &&f) const -> decltype(f(SkRecords::NoOp()))
static std::unique_ptr< SkStreamAsset > MakeFromFile(const char path[])
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeWH(float w, float h)
SkSerialImageProc fImageProc