summaryrefslogtreecommitdiff
path: root/src/intel_video.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-07-15 13:54:04 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-07-16 10:31:58 +0100
commit24bdfe0d5eb4e890e9c63bbb4617efaa0768ab7f (patch)
tree2259c2b93ac978f55011a21595330b6b532d789f /src/intel_video.h
parent2267e5928bd90a6997970584462bd97df447e819 (diff)
video: Reuse the old buffers.
After passing the new buffer to the kernel, the old buffer is unpinned and becomes available for re-use. So keep hold of the old buffer and swap after a PutImage. This greatly reduces the amount of CPU time consumed by the kernel on behalf of the video overlay -- by only allocating two buffers for an entire sequence, we avoid clflushing and page allocation on every frame. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_video.h')
-rw-r--r--src/intel_video.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_video.h b/src/intel_video.h
index e1ba09af..d567eace 100644
--- a/src/intel_video.h
+++ b/src/intel_video.h
@@ -52,7 +52,8 @@ typedef struct {
Time offTime;
Time freeTime;
/** YUV data buffers */
- drm_intel_bo *buf;
+ drm_intel_bo *buf, *old_buf;
+ Bool reusable;
Bool textured;
Rotation rotation; /* should remove intel->rotation later */