Am 28.11.2011 10:35, schrieb Christoph Bartoschek:

Now one has to look at
(*pGC->ops->PolyRectangle)(pDrawable, pGC, nRects, pRects);

Here is what I see so far:

- damagePolyRectangle is called for 2044 rectangles.

- the damage region is computed it consists of about 1000 rectangles each time.

- miPolyRectangle is called.

- the function iterates over all rectangles and calls exaPolylines for each of them because most have only a width and height of 0

- exaPolylines calls ExaCheckPolylines.


We see that for each rectanlge ExaCheckPolylines is called. I have added timers to this function to see what costs time:


void
ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
                  int mode, int npt, DDXPointPtr ppt)
{
  EXA_PRE_FALLBACK_GC(pGC);
  EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n",
                pDrawable, exaDrawableLocation(pDrawable),
                pGC->lineWidth, mode, npt));

  exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);       // Step1: 55 s
  exaPrepareAccessGC (pGC);                             // Step2: 2.4 s
  pGC->ops->Polylines (pDrawable, pGC, mode, npt, ppt); // Step3: 2.4 s
  exaFinishAccessGC (pGC);                              // Step4: 2.2 s
  exaFinishAccess (pDrawable, EXA_PREPARE_DEST);        // Step5: 2.2 s
  EXA_POST_FALLBACK_GC(pGC);
}


We see that exaPrepareAccess needs most of the time. Is that expected?

Inside we see that there are some region operations on the damage region in exaCopyDirty. As said before the damage region contains about 1000 rectangles. So we have 2000 times several operations on 1000 rectangeles.

I think this explains the runtime.

Isn't it somehow possible to batch the rectangle drawing such that the region operations are not neccessary for each rectangle?

Isn't is possible to expand the damage region such that it contains less rectangles?

Is this still the correct list, or should I ask the EXA questions elsewhere?

Christoph
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Reply via email to