Lines Matching refs:clip
546 struct rect clip, dest;
561 /* The actual clip is an intersection between stream
562 * source and surface clip
565 clip.x = stream->src.x > plane_state->clip_rect.x ?
568 clip.width = stream->src.x + stream->src.width <
570 stream->src.x + stream->src.width - clip.x :
571 plane_state->clip_rect.x + plane_state->clip_rect.width - clip.x ;
573 clip.y = stream->src.y > plane_state->clip_rect.y ?
576 clip.height = stream->src.y + stream->src.height <
578 stream->src.y + stream->src.height - clip.y :
579 plane_state->clip_rect.y + plane_state->clip_rect.height - clip.y ;
583 * to correctly rotate clip and dst
593 swap(clip.x, clip.y);
594 swap(clip.width, clip.height);
599 clip.x = dest.x + dest.width - clip.x - clip.width;
603 clip.y = dest.y + dest.height - clip.y - clip.height;
607 /* offset = surf_src.ofs + (clip.ofs - surface->dst_rect.ofs) * scl_ratio
608 * num_pixels = clip.num_pix * scl_ratio
610 data->viewport.x = surf_src.x + (clip.x - dest.x) * surf_src.width / dest.width;
611 data->viewport.width = clip.width * surf_src.width / dest.width;
613 data->viewport.y = surf_src.y + (clip.y - dest.y) * surf_src.height / dest.height;
614 data->viewport.height = clip.height * surf_src.height / dest.height;
767 /* Adjust for viewport end clip-off */
806 /* Adjust for viewport end clip-off */