Ejemplo n.º 1
0
/* FUNCION MAIN DEL PROGRAMA BUSCA */
int main(int argc, char *argv[])
{
	char *list[256];
	int num_filts;
	/*int ejec;

	  int i;*/

	accfunc actfunc = NULL;
	filtfunc filt = NULL;

	opt_t *opt = (opt_t *) malloc(sizeof(opt_t) + sizeof(char *) * (argc -
				6));

	if (opt == NULL) 
		exit(ENOMEM); /*Falta memoria*/

	if(argc<5 || !strcmp(argv[1],"-h")) {
		fprintf(POCARG);
		return 0;
	}

	parse_args(argc, argv, opt); 

	actfunc = choose_action((*opt).accion);
	filt = choose_filter((*opt).filtro);

	num_filts = parse_dir(opt, filt, list);

	ejecuta(opt, actfunc, num_filts, list);

	free(opt);

	return (RET_VAL);
}
Ejemplo n.º 2
0
SkLinearBitmapPipeline::SkLinearBitmapPipeline(
    const SkMatrix& inverse,
    SkFilterQuality filterQuality,
    SkShader::TileMode xTile, SkShader::TileMode yTile,
    const SkPixmap& srcPixmap) {
    SkSize size = SkSize::Make(srcPixmap.width(), srcPixmap.height());
    const SkImageInfo& srcImageInfo = srcPixmap.info();

    // As the stages are built, the chooser function may skip a stage. For example, with the
    // identity matrix, the matrix stage is skipped, and the tilerStage is the first stage.
    auto placementStage = choose_pixel_placer(srcImageInfo.alphaType(), &fPixelStage);
    auto samplerStage   = choose_pixel_sampler(placementStage, srcPixmap, &fSampleStage);
    auto tilerStage     = choose_tiler(samplerStage, size, xTile, yTile, &fTileXOrBothStage,
                                       &fTileYStage);
    auto filterStage    = choose_filter(tilerStage, filterQuality, &fFilterStage);
    fFirstStage         = choose_matrix(filterStage, inverse, &fMatrixStage);
}