OSDN Git Service

test: add wrapper for SyncSurface
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Mon, 26 Sep 2016 20:11:46 +0000 (13:11 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 31 Oct 2016 02:00:08 +0000 (10:00 +0800)
Add a wrapper that calls the driver i965_SyncSurface.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 0f8dc3d11e470747a1b90fe9c2eea5c8070893a5)

test/i965_internal_decl.h
test/i965_test_fixture.cpp
test/i965_test_fixture.h

index 1b6fc40..dbfcbb8 100644 (file)
@@ -66,6 +66,9 @@ extern "C" {
     extern VAStatus i965_DestroyImage(
         VADriverContextP, VAImageID);
 
+    extern VAStatus i965_SyncSurface(
+        VADriverContextP, VASurfaceID);
+
     extern struct hw_codec_info *i965_get_codec_info(int);
     extern const struct intel_device_info *i965_get_device_info(int);
 
index dd81430..073a24e 100644 (file)
@@ -212,6 +212,12 @@ void I965TestFixture::destroyImage(VAImage &image)
         i965_DestroyImage(*this, image.image_id));
 }
 
+void I965TestFixture::syncSurface(VASurfaceID surface)
+{
+    EXPECT_STATUS(
+        i965_SyncSurface(*this, surface));
+}
+
 class I965TestFixtureTest
     : public I965TestFixture
 {
index d09f31d..54d85d2 100644 (file)
@@ -207,6 +207,12 @@ public:
     void destroyImage(VAImage &);
 
     /**
+     * Convenience wrapper for i965_SyncSurface.  May generate a non-fatal
+     * test assertion failure.
+     */
+    void syncSurface(VASurfaceID);
+
+    /**
      * VADisplay implicit and explicit conversion operator.
      */
     operator VADisplay();