-extern void
-util_surface_copy(struct pipe_context *pipe,
- boolean do_flip,
- struct pipe_surface *dst,
- unsigned dst_x, unsigned dst_y,
- struct pipe_surface *src,
- unsigned src_x, unsigned src_y,
- unsigned w, unsigned h);
+static inline void
+u_rect_possible_intersection(const struct u_rect *a,
+ struct u_rect *b)
+{
+ if (u_rect_test_intersection(a,b)) {
+ u_rect_find_intersection(a,b);
+ }
+ else {
+ /*
+ * Note the u_rect_xx tests deal with inclusive coordinates
+ * hence all-zero would not be an empty box.
+ */
+ b->x0 = b->y0 = 0;
+ b->x1 = b->y1 = -1;
+ }
+}