summaryrefslogtreecommitdiff
path: root/glamor/glamor.c
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-07-03 18:24:07 +0800
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:53 -0800
commit32a7438bf79573100862ad91c5722d12623a8bf9 (patch)
treed57bc3ce02e8bc4d1186602c7fe81ede624306cc /glamor/glamor.c
parent0706423bcfd7a589bab3b41fe9f13d0b636ecdef (diff)
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>
Diffstat (limited to 'glamor/glamor.c')
-rw-r--r--glamor/glamor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 01f6a9a8f..8b7dc930d 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -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