summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/identity/id_screen.c
diff options
context:
space:
mode:
authorRichard Li <richardradeon@gmail.com>2009-11-19 16:17:13 -0500
committerRichard Li <richardradeon@gmail.com>2009-11-19 16:17:13 -0500
commit49b3f4a6bc498d964296f7305b490ec983b9fac4 (patch)
treeb56c8899e2db1a9f2a7a97da038ec943a93daed9 /src/gallium/drivers/identity/id_screen.c
parent6345a7ba447d3e04b939ead6fee44fe9201ec2e3 (diff)
parent90e69c81e445136b7d14c569cab5b517b8073498 (diff)
Merge branch 'master' of ssh://richardradeon@git.freedesktop.org/git/mesa/mesa
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 26439637d0..53eae3ef54 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;