mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
glamor_copyarea: Use blitcopy if current state is not render.
Practically, for pure 2D blit, the blit copy is much faster than textured copy. For the x11perf copywinwin100, it's about 3x faster. But if we have heavy rendering/compositing, then use textured copy will get much better (>30%)performance for most of the cases. So we simply add a data element to track current state. For rendering state we use textured copy, otherwise, we use blit copy. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
This commit is contained in:
parent
0706423bcf
commit
32a7438bf7
6 changed files with 24 additions and 44 deletions
|
|
@ -225,6 +225,11 @@ glamor_block_handler(ScreenPtr screen)
|
|||
dispatch->glFlush();
|
||||
glamor_fbo_expire(glamor_priv);
|
||||
glamor_put_dispatch(glamor_priv);
|
||||
if (glamor_priv->state == RENDER_STATE
|
||||
&& glamor_priv->render_idle_cnt++ > RENDER_IDEL_MAX) {
|
||||
glamor_priv->state = IDLE_STATE;
|
||||
glamor_priv->render_idle_cnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue