diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-12-12 07:09:03 +0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-12-18 11:23:46 -0800 |
commit | e3d16c9ebdffe8e5793ee253cf9f72b884b42805 (patch) | |
tree | 8033393128b7403276624e55c5ee3f68969a3289 /glamor/glamor.h | |
parent | 36d424feaeec765d131c015df77d24db1a36fc38 (diff) |
Classfy glamor pixmap to different types.
During the integration with intel driver, we introduce two
new type of pixmap, one is TEXTURE_DRM, the other is DRM_ONLY.
TEXTURE_DRM means we create a texture bind to the DRM buffer
successfully. And then the texture and the external BO is
consistent. DRM_ONLY means that we failed to create a texture
from the external DRM BO. We need to handle those different
types carefully, so we have to track them in the data structure.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor.h')
-rw-r--r-- | glamor/glamor.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/glamor/glamor.h b/glamor/glamor.h index fd056e96a..6febb5933 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -50,6 +50,20 @@ | GLAMOR_USE_SCREEN \ | GLAMOR_USE_PICTURE_SCREEN) +/* + * glamor_pixmap_type : glamor pixmap's type. + * @MEMORY: pixmap is in memory. + * @TEXTURE_DRM: pixmap is in a texture created from a DRM buffer. + * @DRM_ONLY: pixmap is in a external DRM buffer. + * @TEXTURE_ONLY: pixmap is in an internal texture. + */ +typedef enum glamor_pixmap_type { + GLAMOR_MEMORY, + GLAMOR_TEXTURE_DRM, + GLAMOR_DRM_ONLY, + GLAMOR_TEXTURE_ONLY +} glamor_pixmap_type_t; + #define GLAMOR_EGL_EXTERNAL_BUFFER 3 extern _X_EXPORT Bool glamor_init(ScreenPtr screen, unsigned int flags); @@ -58,9 +72,11 @@ extern _X_EXPORT void glamor_set_screen_pixmap_texture(ScreenPtr screen, int w, int h, unsigned int tex); extern _X_EXPORT Bool glamor_glyphs_init(ScreenPtr pScreen); -void glamor_set_pixmap_texture(PixmapPtr pixmap, int w, int h, - unsigned int tex); +extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap, int w, int h, + unsigned int tex); + +extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type); extern _X_EXPORT void glamor_destroy_textured_pixmap(PixmapPtr pixmap); extern _X_EXPORT void glamor_block_handler(ScreenPtr screen); |