239 {
244
245
251 }
252#if defined(SK_FONTMGR_FONTCONFIG_AVAILABLE)
254#else
256#endif
259 if (!data) {
261 return 1;
262 } else {
265 perror("Unable to decode the source image.");
266 return 1;
267 }
269 }
270 }
280 }
285 srand(0);
288 }
289#ifdef SK_GL
291 std::unique_ptr<sk_gpu_test::GLTestContext> glContext;
293 if (!direct) {
294 fputs("Unable to get GrContext.\n", stderr);
295 } else {
297 fputs("Unable to create backend objects.\n", stderr);
299 }
300
303 fputs("Unable to get render surface.\n", stderr);
305 }
306 srand(0);
309 }
310 }
311#endif
312
313#ifdef SK_SUPPORT_PDF
317 if (document) {
318 srand(0);
320 document->close();
322 }
323 }
324#endif
325
329 srand(0);
335 }
336
343 } else {
345 dump_output(textoutput.c_str(), textoutput.length(),
"Text",
false);
346 }
348 dump_output(glinfo.c_str(), glinfo.length(),
"GLInfo",
true);
350
351 return 0;
352}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkAssertResult(cond)
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
SK_API sk_sp< SkFontMgr > SkFontMgr_New_FontConfig(FcConfig *fc)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
static void Parse(int argc, const char *const *argv)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > MakeSRGBLinear()
static sk_sp< SkData > MakeFromFileName(const char path[])
sk_sp< SkData > detachAsData()
static sk_sp< SkFontMgr > RefEmpty()
bool asLegacyBitmap(SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
sk_sp< SkData > serialize(const SkSerialProcs *procs=nullptr) const
DrawOptions GetDrawOptions()
sk_sp< GrDirectContext > create_direct_context(std::ostringstream &driverinfo, std::unique_ptr< sk_gpu_test::GLTestContext > *glContext)
sk_sp< SkFontMgr > fontMgr
static sk_sp< SkData > encode_snapshot(GrDirectContext *ctx, const sk_sp< SkSurface > &surface)
static SkCanvas * prepare_canvas(SkCanvas *canvas)
std::ostringstream gTextOutput
std::ostringstream gGLDriverInfo
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
SK_API sk_sp< SkDocument > MakeDocument(SkWStream *stream, const Metadata &metadata)
sk_sp< const SkPicture > picture
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkSize Make(SkScalar w, SkScalar h)