[Password manager tests] Refactoring of util which runs tests.
[chromium-blink-merge.git] / third_party / libva / va / va_trace.h
blob2a14fa696078161adc3be8e5d0a8b62189353459
1 /*
2 * Copyright (c) 2009 Intel Corporation. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #ifndef VA_TRACE_H
26 #define VA_TRACE_H
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 extern int trace_flag;
34 #define VA_TRACE_FLAG_LOG 0x1
35 #define VA_TRACE_FLAG_BUFDATA 0x2
36 #define VA_TRACE_FLAG_CODEDBUF 0x4
37 #define VA_TRACE_FLAG_SURFACE_DECODE 0x8
38 #define VA_TRACE_FLAG_SURFACE_ENCODE 0x10
39 #define VA_TRACE_FLAG_SURFACE_JPEG 0x20
40 #define VA_TRACE_FLAG_SURFACE (VA_TRACE_FLAG_SURFACE_DECODE | \
41 VA_TRACE_FLAG_SURFACE_ENCODE | \
42 VA_TRACE_FLAG_SURFACE_JPEG)
44 #define VA_TRACE_LOG(trace_func,...) \
45 if (trace_flag & VA_TRACE_FLAG_LOG) { \
46 trace_func(__VA_ARGS__); \
48 #define VA_TRACE_SURFACE(trace_func,...) \
49 if (trace_flag & (VA_TRACE_FLAG_SURFACE | VA_TRACE_FLAG_CODEDBUF)) { \
50 trace_func(__VA_ARGS__); \
53 void va_TraceInit(VADisplay dpy);
54 void va_TraceEnd(VADisplay dpy);
56 void va_TraceInitialize (
57 VADisplay dpy,
58 int *major_version, /* out */
59 int *minor_version /* out */
62 void va_TraceTerminate (
63 VADisplay dpy
66 void va_TraceCreateConfig(
67 VADisplay dpy,
68 VAProfile profile,
69 VAEntrypoint entrypoint,
70 VAConfigAttrib *attrib_list,
71 int num_attribs,
72 VAConfigID *config_id /* out */
75 void va_TraceCreateSurfaces(
76 VADisplay dpy,
77 int width,
78 int height,
79 int format,
80 int num_surfaces,
81 VASurfaceID *surfaces, /* out */
82 VASurfaceAttrib *attrib_list,
83 unsigned int num_attribs
86 void va_TraceCreateContext(
87 VADisplay dpy,
88 VAConfigID config_id,
89 int picture_width,
90 int picture_height,
91 int flag,
92 VASurfaceID *render_targets,
93 int num_render_targets,
94 VAContextID *context /* out */
97 void va_TraceCreateBuffer (
98 VADisplay dpy,
99 VAContextID context, /* in */
100 VABufferType type, /* in */
101 unsigned int size, /* in */
102 unsigned int num_elements, /* in */
103 void *data, /* in */
104 VABufferID *buf_id /* out */
107 void va_TraceDestroyBuffer (
108 VADisplay dpy,
109 VABufferID buf_id /* in */
112 void va_TraceMapBuffer (
113 VADisplay dpy,
114 VABufferID buf_id, /* in */
115 void **pbuf /* out */
119 void va_TraceBeginPicture(
120 VADisplay dpy,
121 VAContextID context,
122 VASurfaceID render_target
125 void va_TraceRenderPicture(
126 VADisplay dpy,
127 VAContextID context,
128 VABufferID *buffers,
129 int num_buffers
132 void va_TraceEndPicture(
133 VADisplay dpy,
134 VAContextID context,
135 int endpic_done
138 void va_TraceSyncSurface(
139 VADisplay dpy,
140 VASurfaceID render_target
143 void va_TraceQuerySurfaceAttributes(
144 VADisplay dpy,
145 VAConfigID config,
146 VASurfaceAttrib *attrib_list,
147 unsigned int *num_attribs
150 void va_TraceQuerySurfaceStatus(
151 VADisplay dpy,
152 VASurfaceID render_target,
153 VASurfaceStatus *status /* out */
156 void va_TraceQuerySurfaceError(
157 VADisplay dpy,
158 VASurfaceID surface,
159 VAStatus error_status,
160 void **error_info /*out*/
164 void va_TraceMaxNumDisplayAttributes (
165 VADisplay dpy,
166 int number
169 void va_TraceQueryDisplayAttributes (
170 VADisplay dpy,
171 VADisplayAttribute *attr_list, /* out */
172 int *num_attributes /* out */
175 void va_TraceGetDisplayAttributes (
176 VADisplay dpy,
177 VADisplayAttribute *attr_list,
178 int num_attributes
181 void va_TraceSetDisplayAttributes (
182 VADisplay dpy,
183 VADisplayAttribute *attr_list,
184 int num_attributes
187 /* extern function called by display side */
188 void va_TracePutSurface (
189 VADisplay dpy,
190 VASurfaceID surface,
191 void *draw, /* the target Drawable */
192 short srcx,
193 short srcy,
194 unsigned short srcw,
195 unsigned short srch,
196 short destx,
197 short desty,
198 unsigned short destw,
199 unsigned short desth,
200 VARectangle *cliprects, /* client supplied clip list */
201 unsigned int number_cliprects, /* number of clip rects in the clip list */
202 unsigned int flags /* de-interlacing flags */
205 #ifdef __cplusplus
207 #endif
210 #endif /* VA_TRACE_H */