std::unique_ptr toSkSurfaceProps()

in platform/cc/interop.cc [741:751]


        std::unique_ptr<SkSurfaceProps> toSkSurfaceProps(JNIEnv* env, jobject surfacePropsObj) {
            if (surfacePropsObj == nullptr)
                return std::unique_ptr<SkSurfaceProps>(nullptr);
            uint32_t flags = static_cast<uint32_t>(env->CallIntMethod(surfacePropsObj, _getFlags));
            if (java::lang::Throwable::exceptionThrown(env))
                std::unique_ptr<SkSurfaceProps>(nullptr);
            SkPixelGeometry geom = static_cast<SkPixelGeometry>(env->CallIntMethod(surfacePropsObj, _getPixelGeometryOrdinal));
            if (java::lang::Throwable::exceptionThrown(env))
                std::unique_ptr<SkSurfaceProps>(nullptr);
            return std::make_unique<SkSurfaceProps>(flags, geom);
        }