summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/identity/id_screen.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-19 08:18:58 +0100
committerMichal Krol <michal@vmware.com>2009-11-19 08:25:25 +0100
commitf56b95e40796ea3859b1cb83341730bf74a6f85f (patch)
tree377d7a9548b966550b96f05abb5ff2971a519775 /src/gallium/drivers/identity/id_screen.c
parentc5dc8d7eccab38bf644ac1b9a58d0c5fe4acc4d7 (diff)
downloadexternal_mesa3d-f56b95e40796ea3859b1cb83341730bf74a6f85f.zip
external_mesa3d-f56b95e40796ea3859b1cb83341730bf74a6f85f.tar.gz
external_mesa3d-f56b95e40796ea3859b1cb83341730bf74a6f85f.tar.bz2
identity: Add missing screen methods.
Diffstat (limited to 'src/gallium/drivers/identity/id_screen.c')
-rw-r--r--src/gallium/drivers/identity/id_screen.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/drivers/identity/id_screen.c b/src/gallium/drivers/identity/id_screen.c
index 2643963..53eae3e 100644
--- a/src/gallium/drivers/identity/id_screen.c
+++ b/src/gallium/drivers/identity/id_screen.c
@@ -379,6 +379,33 @@ identity_screen_buffer_destroy(struct pipe_buffer *_buffer)
identity_buffer_destroy(identity_buffer(_buffer));
}
+static struct pipe_video_surface *
+identity_screen_video_surface_create(struct pipe_screen *_screen,
+ enum pipe_video_chroma_format chroma_format,
+ unsigned width,
+ unsigned height)
+{
+ struct identity_screen *id_screen = identity_screen(_screen);
+ struct pipe_screen *screen = id_screen->screen;
+ struct pipe_video_surface *result;
+
+ result = screen->video_surface_create(screen,
+ chroma_format,
+ width,
+ height);
+
+ if (result) {
+ return identity_video_surface_create(id_screen, result);
+ }
+ return NULL;
+}
+
+static void
+identity_screen_video_surface_destroy(struct pipe_video_surface *_vsfc)
+{
+ identity_video_surface_destroy(identity_video_surface(_vsfc));
+}
+
static void
identity_screen_flush_frontbuffer(struct pipe_screen *_screen,
struct pipe_surface *_surface,
@@ -472,6 +499,12 @@ identity_screen_create(struct pipe_screen *screen)
if (screen->buffer_unmap)
id_screen->base.buffer_unmap = identity_screen_buffer_unmap;
id_screen->base.buffer_destroy = identity_screen_buffer_destroy;
+ if (screen->video_surface_create) {
+ id_screen->base.video_surface_create = identity_screen_video_surface_create;
+ }
+ if (screen->video_surface_destroy) {
+ id_screen->base.video_surface_destroy = identity_screen_video_surface_destroy;
+ }
id_screen->base.flush_frontbuffer = identity_screen_flush_frontbuffer;
id_screen->base.fence_reference = identity_screen_fence_reference;
id_screen->base.fence_signalled = identity_screen_fence_signalled;