correct wrong usage of _secVideoPunchDrawable. 93/27393/1
authorBoram Park <boram1288.park@samsung.com>
Fri, 12 Sep 2014 04:45:20 +0000 (13:45 +0900)
committerBoram Park <boram1288.park@samsung.com>
Fri, 12 Sep 2014 07:13:39 +0000 (16:13 +0900)
   _secVideoPunchDrawable() is only for testing. Don't use this function
   for real case. You can enable _secVideoPunchDrawable by running "xberc
   video_punch 1". If video can't be displayed caused by UI, applications
   should fix their UI code. not xv code.

Change-Id: I71c5c1e666427d07066918877c7d5c35bca7b412

src/xv/sec_video.c

index 884872d..71d68e5 100644 (file)
@@ -1529,29 +1529,21 @@ _secVideoPunchDrawable (SECPortPrivPtr pPort)
     PixmapPtr pPixmap = _getPixmap (pPort->d.pDraw);
     SECPtr pSec = SECPTR (pPort->pScrn);
 
-    if (pPort->drawing != ON_FB)
-    {
-        XDBG_DEBUG (MVDO, "pPort->drawing (%d), pSec->pVideoPriv->video_punch (%d)\n",
-                    pPort->drawing, pSec->pVideoPriv->video_punch);
+    if (pPort->drawing != ON_FB || !pSec->pVideoPriv->video_punch)
         return;
-    }
 
     if (!pPort->punched)
     {
-        DamageRegionAppend(pPort->d.pDraw, pPort->d.clip_boxes);
         secExaPrepareAccess (pPixmap, EXA_PREPARE_DEST);
         if (pPixmap->devPrivate.ptr)
             memset (pPixmap->devPrivate.ptr, 0,
                     pPixmap->drawable.width * pPixmap->drawable.height * 4);
         secExaFinishAccess (pPixmap, EXA_PREPARE_DEST);
-        DamageRegionProcessPending(pPort->d.pDraw);
         XDBG_TRACE (MVDO, "Punched (%dx%d) %p. \n",
                     pPixmap->drawable.width, pPixmap->drawable.height,
                     pPixmap->devPrivate.ptr);
         pPort->punched = TRUE;
-#if 0
         DamageDamageRegion (pPort->d.pDraw, pPort->d.clip_boxes);
-#endif
     }
 }