2 /**************************************************************************
4 * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sub license, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
15 * The above copyright notice and this permission notice (including the
16 * next paragraph) shall be included in all copies or substantial portions
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 **************************************************************************/
29 #ifndef INTEL_BUFFERS_H
30 #define INTEL_BUFFERS_H
36 struct intel_framebuffer
;
40 intel_intersect_cliprects(drm_clip_rect_t
* dest
,
41 const drm_clip_rect_t
* a
,
42 const drm_clip_rect_t
* b
);
44 extern struct intel_region
*intel_readbuf_region(struct intel_context
*intel
);
46 extern struct intel_region
*intel_drawbuf_region(struct intel_context
*intel
);
48 extern void intel_check_front_buffer_rendering(struct intel_context
*intel
);
50 extern void intel_draw_buffer(GLcontext
* ctx
, struct gl_framebuffer
*fb
);
52 extern void intelInitBufferFuncs(struct dd_function_table
*functions
);
54 void intel_get_cliprects(struct intel_context
*intel
,
55 struct drm_clip_rect
**cliprects
,
56 unsigned int *num_cliprects
,
57 int *x_off
, int *y_off
);
59 void intelCalcViewport(GLcontext
* ctx
);
62 #endif /* INTEL_BUFFERS_H */