Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: third_party/libva/va/x11/va_dricommon.h

Issue 62273006: Update libva headers to the latest release (1.2.1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: remove two header files, fix comment style Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 Intel Corporation. All Rights Reserved. 2 * Copyright (c) 2012 Intel Corporation. All Rights Reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the 5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including 6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish, 7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to 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 9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions: 10 * the following conditions:
(...skipping 14 matching lines...) Expand all
25 #define _VA_DRICOMMON_H_ 25 #define _VA_DRICOMMON_H_
26 26
27 #ifndef ANDROID 27 #ifndef ANDROID
28 #include <X11/Xlib.h> 28 #include <X11/Xlib.h>
29 #include <xf86drm.h> 29 #include <xf86drm.h>
30 #include <drm.h> 30 #include <drm.h>
31 #include <drm_sarea.h> 31 #include <drm_sarea.h>
32 #endif 32 #endif
33 33
34 #include <va/va_backend.h> 34 #include <va/va_backend.h>
35 #include <va/va_drmcommon.h>
35 36
36 #ifdef ANDROID 37 #ifdef ANDROID
37 #define XID unsigned int 38 #define XID unsigned int
38 #define Bool int 39 #define Bool int
39 #endif 40 #endif
40 41
41 enum 42 enum {
42 { 43 /* Compatibility. Do not use for newly-written code. */
43 VA_NONE = 0, 44 VA_NONE = VA_DRM_AUTH_NONE,
44 VA_DRI1 = 1, 45 VA_DRI1 = VA_DRM_AUTH_DRI1,
45 VA_DRI2 = 2, 46 VA_DRI2 = VA_DRM_AUTH_DRI2,
46 VA_DUMMY = 3 47 VA_DUMMY = VA_DRM_AUTH_CUSTOM
47 }; 48 };
48 49
49 union dri_buffer 50 union dri_buffer
50 { 51 {
51 struct { 52 struct {
52 unsigned int attachment; 53 unsigned int attachment;
53 unsigned int name; 54 unsigned int name;
54 unsigned int pitch; 55 unsigned int pitch;
55 unsigned int cpp; 56 unsigned int cpp;
56 unsigned int flags; 57 unsigned int flags;
57 } dri2; 58 } dri2;
58 }; 59 };
59 60
60 struct dri_drawable 61 struct dri_drawable
61 { 62 {
62 XID x_drawable; 63 XID x_drawable;
63 int is_window; 64 int is_window;
64 int x; 65 int x;
65 int y; 66 int y;
66 unsigned int width; 67 unsigned int width;
67 unsigned int height; 68 unsigned int height;
68 struct dri_drawable *next; 69 struct dri_drawable *next;
69 }; 70 };
70 71
71 #define DRAWABLE_HASH_SZ 32 72 #define DRAWABLE_HASH_SZ 32
72 struct dri_state 73 struct dri_state
73 { 74 {
74 int fd; 75 struct drm_state base;
75 int driConnectedFlag; /* 0: disconnected, 1: DRI, 2: DRI2 */
76 #ifndef ANDROID 76 #ifndef ANDROID
77 struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ]; 77 struct dri_drawable *drawable_hash[DRAWABLE_HASH_SZ];
78 78
79 struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_drawable) ; 79 struct dri_drawable *(*createDrawable)(VADriverContextP ctx, XID x_drawable) ;
80 void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_drawa ble); 80 void (*destroyDrawable)(VADriverContextP ctx, struct dri_drawable *dri_drawa ble);
81 void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable); 81 void (*swapBuffer)(VADriverContextP ctx, struct dri_drawable *dri_drawable);
82 union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dri_dra wable *dri_drawable); 82 union dri_buffer *(*getRenderingBuffer)(VADriverContextP ctx, struct dri_dra wable *dri_drawable);
83 void (*close)(VADriverContextP ctx); 83 void (*close)(VADriverContextP ctx);
84 #endif 84 #endif
85 }; 85 };
86 86
87 Bool isDRI2Connected(VADriverContextP ctx, char **driver_name); 87 Bool isDRI2Connected(VADriverContextP ctx, char **driver_name);
88 void free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable); 88 void free_drawable(VADriverContextP ctx, struct dri_drawable* dri_drawable);
89 void free_drawable_hashtable(VADriverContextP ctx); 89 void free_drawable_hashtable(VADriverContextP ctx);
90 struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable); 90 struct dri_drawable *dri_get_drawable(VADriverContextP ctx, XID drawable);
91 void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable); 91 void dri_swap_buffer(VADriverContextP ctx, struct dri_drawable *dri_drawable);
92 union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri_draw able *dri_drawable); 92 union dri_buffer *dri_get_rendering_buffer(VADriverContextP ctx, struct dri_draw able *dri_drawable);
93 93
94 #endif /* _VA_DRICOMMON_H_ */ 94 #endif /* _VA_DRICOMMON_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698