Re: [PATCH xserver 1/4] dri2: Only invalidate the immediate Window upon SetWindowPixmap

2016-02-08 Thread Adam Jackson
On Wed, 2016-02-03 at 15:36 +0200, Ville Syrjälä wrote:
> On Wed, Feb 03, 2016 at 09:54:43AM +, Chris Wilson wrote:
> > All callers of SetWindowPixmap will themselves be traversing the Window
> > heirachy updating the backing Pixmap of each child and so we can forgo
> > doing the identical traversal inside the DRI2SetWindowPixmap handler.
> > 
> > Reported-by: Loïc Yhuel 
> > Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html
> > Signed-off-by: Chris Wilson 
> > Cc: Ville Syrjälä 
> 
> Seems sane.
> Reviewed-by: Ville Syrjälä 

To ssh://git.freedesktop.org/git/xorg/xserver
   da69f2f..b7d3929  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver 1/4] dri2: Only invalidate the immediate Window upon SetWindowPixmap

2016-02-03 Thread Chris Wilson
All callers of SetWindowPixmap will themselves be traversing the Window
heirachy updating the backing Pixmap of each child and so we can forgo
doing the identical traversal inside the DRI2SetWindowPixmap handler.

Reported-by: Loïc Yhuel 
Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html
Signed-off-by: Chris Wilson 
Cc: Ville Syrjälä 
---
 hw/xfree86/dri2/dri2.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 60ea6dd..bbff11c 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -1385,8 +1385,7 @@ DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int 
h, int bw,
 static void
 DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
 {
-DrawablePtr pDraw = (DrawablePtr) pWin;
-ScreenPtr pScreen = pDraw->pScreen;
+ScreenPtr pScreen = pWin->drawable.pScreen;
 DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
 
 pScreen->SetWindowPixmap = ds->SetWindowPixmap;
@@ -1394,7 +1393,7 @@ DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
 ds->SetWindowPixmap = pScreen->SetWindowPixmap;
 pScreen->SetWindowPixmap = DRI2SetWindowPixmap;
 
-DRI2InvalidateDrawableAll(pDraw);
+DRI2InvalidateDrawable(>drawable);
 }
 
 #define MAX_PRIME DRI2DriverPrimeMask
-- 
2.7.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 1/4] dri2: Only invalidate the immediate Window upon SetWindowPixmap

2016-02-03 Thread Ville Syrjälä
On Wed, Feb 03, 2016 at 09:54:43AM +, Chris Wilson wrote:
> All callers of SetWindowPixmap will themselves be traversing the Window
> heirachy updating the backing Pixmap of each child and so we can forgo
> doing the identical traversal inside the DRI2SetWindowPixmap handler.
> 
> Reported-by: Loïc Yhuel 
> Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html
> Signed-off-by: Chris Wilson 
> Cc: Ville Syrjälä 

Seems sane.
Reviewed-by: Ville Syrjälä 

> ---
>  hw/xfree86/dri2/dri2.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
> index 60ea6dd..bbff11c 100644
> --- a/hw/xfree86/dri2/dri2.c
> +++ b/hw/xfree86/dri2/dri2.c
> @@ -1385,8 +1385,7 @@ DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, 
> int h, int bw,
>  static void
>  DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
>  {
> -DrawablePtr pDraw = (DrawablePtr) pWin;
> -ScreenPtr pScreen = pDraw->pScreen;
> +ScreenPtr pScreen = pWin->drawable.pScreen;
>  DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
>  
>  pScreen->SetWindowPixmap = ds->SetWindowPixmap;
> @@ -1394,7 +1393,7 @@ DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
>  ds->SetWindowPixmap = pScreen->SetWindowPixmap;
>  pScreen->SetWindowPixmap = DRI2SetWindowPixmap;
>  
> -DRI2InvalidateDrawableAll(pDraw);
> +DRI2InvalidateDrawable(>drawable);
>  }
>  
>  #define MAX_PRIME DRI2DriverPrimeMask
> -- 
> 2.7.0

-- 
Ville Syrjälä
Intel OTC
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel