614 {
615
617 bool useDIText = false;
618 bool useDMSAA = false;
619 int samples = 1;
622 bool useStencils = true;
623 int testPersistentCache = 0;
624 bool testPrecompile = false;
625 bool useDDLs = false;
626 bool slug = false;
627 bool serializeSlug = false;
628 bool remoteSlug = false;
629 bool reducedShaders = false;
630 bool fakeGLESVersion2 = false;
632
633 bool parseSucceeded = false;
635 if (!parseSucceeded) {
636 return nullptr;
637 }
638
639 bool validOptions =
640 extendedOptions.get_option_gpu_api("api", &contextType, &fakeGLESVersion2, false) &&
641 extendedOptions.get_option_bool("dit", &useDIText) &&
642 extendedOptions.get_option_int("samples", &samples) &&
643 extendedOptions.get_option_bool("dmsaa", &useDMSAA) &&
644 extendedOptions.get_option_gpu_color(
"color", &
colorType, &alphaType) &&
645 extendedOptions.get_option_bool("stencils", &useStencils) &&
646 extendedOptions.get_option_int("testPersistentCache", &testPersistentCache) &&
647 extendedOptions.get_option_bool("testPrecompile", &testPrecompile) &&
648 extendedOptions.get_option_bool("useDDLSink", &useDDLs) &&
649 extendedOptions.get_option_bool("slug", &slug) &&
650 extendedOptions.get_option_bool("serializeSlug", &serializeSlug) &&
651 extendedOptions.get_option_bool("remoteSlug", &remoteSlug) &&
652 extendedOptions.get_option_bool("reducedShaders", &reducedShaders) &&
653 extendedOptions.get_option_gpu_surf_type("surf", &surfType);
654
655 if (!validOptions) {
656 return nullptr;
657 }
658
659 uint32_t surfaceFlags = 0;
660 if (useDIText) {
662 }
663 if (useDMSAA) {
665 }
666
668 vias,
669 contextType,
670 fakeGLESVersion2,
671 surfaceFlags,
672 samples,
674 alphaType,
675 useStencils,
676 testPersistentCache,
677 testPrecompile,
678 useDDLs,
679 slug,
680 serializeSlug,
681 remoteSlug,
682 reducedShaders,
683 surfType);
684}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
@ kUseDeviceIndependentFonts_Flag