revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / gallium / state_trackers / vega / image.h
blob391c048594843941e82f78fb52e157f1b9a1e339
1 /**************************************************************************
3 * Copyright 2009 VMware, Inc. All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sub license, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial portions
15 * of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 **************************************************************************/
27 #ifndef IMAGES_H
28 #define IMAGES_H
30 #include "vg_context.h"
31 #include "pipe/p_state.h"
33 struct pipe_resource;
34 struct array;
35 struct vg_context;
36 struct pipe_surface;
38 struct vg_image {
39 struct vg_object base;
40 VGImageFormat format;
41 VGint x, y;
42 VGint width, height;
44 struct vg_image *parent;
46 struct pipe_sampler_view *sampler_view;
47 struct pipe_sampler_state sampler;
49 struct array *children_array;
52 struct vg_image *image_create(VGImageFormat format,
53 VGint width, VGint height);
54 void image_destroy(struct vg_image *img);
56 void image_clear(struct vg_image *img,
57 VGint x, VGint y, VGint width, VGint height);
59 void image_sub_data(struct vg_image *image,
60 const void * data,
61 VGint dataStride,
62 VGImageFormat dataFormat,
63 VGint x, VGint y,
64 VGint width, VGint height);
66 void image_get_sub_data(struct vg_image * image,
67 void * data,
68 VGint dataStride,
69 VGImageFormat dataFormat,
70 VGint x, VGint y,
71 VGint width, VGint height);
73 struct vg_image *image_child_image(struct vg_image *parent,
74 VGint x, VGint y,
75 VGint width, VGint height);
77 void image_copy(struct vg_image *dst, VGint dx, VGint dy,
78 struct vg_image *src, VGint sx, VGint sy,
79 VGint width, VGint height,
80 VGboolean dither);
82 void image_draw(struct vg_image *img, struct matrix *matrix);
84 void image_set_pixels(VGint dx, VGint dy,
85 struct vg_image *src, VGint sx, VGint sy,
86 VGint width, VGint height);
87 void image_get_pixels(struct vg_image *dst, VGint dx, VGint dy,
88 VGint sx, VGint sy,
89 VGint width, VGint height);
91 VGint image_bind_samplers(struct vg_image *dst, struct pipe_sampler_state **samplers,
92 struct pipe_sampler_view **sampler_views);
94 VGboolean vg_image_overlaps(struct vg_image *dst,
95 struct vg_image *src);
97 VGint image_sampler_filter(struct vg_context *ctx);
99 void vg_copy_surface(struct vg_context *ctx,
100 struct pipe_surface *dst, VGint dx, VGint dy,
101 struct pipe_surface *src, VGint sx, VGint sy,
102 VGint width, VGint height);
104 #endif