summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2013-03-19 20:58:55 +0800
committerRichard Grenville <pyxlcy@gmail.com>2013-03-19 20:58:55 +0800
commitcdd6a73836cc2c1943cdbceab4328dec96949d51 (patch)
tree3c76c912830222e532272b84fa73d5bf6fe97428 /common.h
parent69c3579a24635e9504bceabc1c76dfe96342c3b0 (diff)
downloadtdebase-cdd6a73836cc2c1943cdbceab4328dec96949d51.tar.gz
tdebase-cdd6a73836cc2c1943cdbceab4328dec96949d51.zip
Improvement: --glx-copy-from-front & benchmark mode
- GLX backend: Add --glx-copy-front, which copies all unmodified regions from front buffer to back buffer instead of redrawing the whole screen. Unfortunately, probably because glCopyPixels() isn't usually well-optimized on graphic cards, this option appears very unstable in its effect: Over 20% boost in performance when only 1/4 of the screen is modified, but 10% decrease when the whole screen is. Thus, not enabled by default. - GLX backend: Add glx_blur_dst(), to prepare for the background blur feature. It currently is capable to modify background in the desired way, but the core blur shader is absent. glConvolution2D() seemingly relies entirely on CPU and has horrifying performance. I've hesitating about whether I should use ARB assembly language or GLSL for the shader. - GLX backend: Invert y-axis GL matrix. It's upside-down previously because that's what dcompmgr uses. Seemingly a "normal" y-axis is required for glCopyPixels() to operate correctly. - GLX backend: Fix some GLX_TEXTURE_RECTANGLE compatibility issues. Still, not actually tested. - Add benchmark mode (--benchmark & --benchmark-wid). - Misc changes.
Diffstat (limited to 'common.h')
-rw-r--r--common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/common.h b/common.h
index 3b6620854..978a9ecb8 100644
--- a/common.h
+++ b/common.h
@@ -297,6 +297,7 @@ struct _glx_texture {
GLuint texture;
GLXPixmap glpixmap;
Pixmap pixmap;
+ GLenum target;
unsigned width;
unsigned height;
unsigned depth;
@@ -341,6 +342,8 @@ typedef struct {
enum backend backend;
/// Whether to avoid using stencil buffer under GLX backend. Might be unsafe.
bool glx_no_stencil;
+ /// Whether to copy unmodified regions from front buffer.
+ bool glx_copy_from_front;
/// Whether to try to detect WM windows and mark them as focused.
bool mark_wmwin_focused;
/// Whether to mark override-redirect windows as focused.
@@ -359,6 +362,10 @@ typedef struct {
bool dbus;
/// Path to log file.
char *logpath;
+ /// Number of cycles to paint in benchmark mode. 0 for disabled.
+ int benchmark;
+ /// Window to constantly repaint in benchmark mode. 0 for full-screen.
+ Window benchmark_wid;
/// Whether to work under synchronized mode for debugging.
bool synchronize;
@@ -1578,6 +1585,9 @@ glx_bind_pixmap(session_t *ps, glx_texture_t **pptex, Pixmap pixmap,
void
glx_release_pixmap(session_t *ps, glx_texture_t *ptex);
+void
+glx_paint_pre(session_t *ps, XserverRegion *preg);
+
/**
* Check if a texture is binded, or is binded to the given pixmap.
*/