aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Tagliamonte <paultag@fluxbox.org>2011-12-10 16:43:24 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2011-12-10 16:43:24 (GMT)
commit5e75c312050185267b05388a3991b932b447a75f (patch)
treeb7b39d55993e612f7bfb373a161f6f5cb4a1f81f
parent596c283553fb2da7e9204621347462bb46b83c4d (diff)
downloadfluxbox_paul-fluxbox-gsoc-2011-integration.zip
fluxbox_paul-fluxbox-gsoc-2011-integration.tar.bz2
Fixing up the branch to use some of the changes that were made since the fork.fluxbox-gsoc-2011-integration
The operator "=" was ditched in favor of .reset( because (I'm quoting here): "it was an accident waiting to happen". Well. It builds now.
-rw-r--r--configure.in16
-rw-r--r--util/fbcompose/OpenGLScreen.cc18
-rw-r--r--util/fbcompose/OpenGLTexPartitioner.cc2
-rw-r--r--util/fbcompose/OpenGLWindow.cc4
-rw-r--r--util/fbcompose/XRenderScreen.cc7
-rw-r--r--util/fbcompose/XRenderWindow.cc4
-rw-r--r--util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc3
-rw-r--r--util/fbcompose/plugins/xrender/fade/FadePlugin.cc8
-rw-r--r--util/fbcompose/plugins/xrender/preview/PreviewPlugin.cc2
9 files changed, 32 insertions, 32 deletions
diff --git a/configure.in b/configure.in
index d17e2e6..d4a8825 100644
--- a/configure.in
+++ b/configure.in
@@ -352,11 +352,6 @@ AC_ARG_ENABLE(nls,
352) 352)
353AC_SUBST(NLS) 353AC_SUBST(NLS)
354 354
355
356
357
358
359
360dnl Check for new timed pixmap cache 355dnl Check for new timed pixmap cache
361AC_MSG_CHECKING([whether to use the new timed pixmap cache]) 356AC_MSG_CHECKING([whether to use the new timed pixmap cache])
362AC_ARG_ENABLE( 357AC_ARG_ENABLE(
@@ -372,7 +367,6 @@ AC_ARG_ENABLE(
372 AC_DEFINE(TIMEDCACHE, 1, "timed cache") 367 AC_DEFINE(TIMEDCACHE, 1, "timed cache")
373) 368)
374 369
375
376AC_MSG_CHECKING([whether to have Xft support]) 370AC_MSG_CHECKING([whether to have Xft support])
377AM_PATH_XFT(yes, 371AM_PATH_XFT(yes,
378 XFT=true, 372 XFT=true,
@@ -640,7 +634,7 @@ enableval="yes"
640AC_MSG_CHECKING([whether fbcompose should be built]) 634AC_MSG_CHECKING([whether fbcompose should be built])
641AC_ARG_ENABLE(fbcompose, 635AC_ARG_ENABLE(fbcompose,
642 AC_HELP_STRING([--enable-fbcompose], 636 AC_HELP_STRING([--enable-fbcompose],
643 [build the fluxbox compositor [default=yes]]), , 637 [build the fluxbox compositor (ALPHA QUALITY) [default=no]]), ,
644 [enableval=yes]) 638 [enableval=yes])
645if test "x$enableval" = "xyes"; then 639if test "x$enableval" = "xyes"; then
646 AC_MSG_RESULT([yes]) 640 AC_MSG_RESULT([yes])
@@ -665,8 +659,8 @@ enableval="yes"
665AC_MSG_CHECKING([whether to have XRender compositing support]) 659AC_MSG_CHECKING([whether to have XRender compositing support])
666AC_ARG_ENABLE(xrender-compositing, 660AC_ARG_ENABLE(xrender-compositing,
667 AC_HELP_STRING([--enable-xrender-compositing], 661 AC_HELP_STRING([--enable-xrender-compositing],
668 [XRender support for fbcompose [default=yes]]), , 662 [XRender support for fbcompose [default=no]]), ,
669 [enableval=yes]) 663 [enableval=no])
670if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then 664if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then
671 AC_MSG_RESULT([yes]) 665 AC_MSG_RESULT([yes])
672 AC_CHECK_LIB([dl], [dlopen], 666 AC_CHECK_LIB([dl], [dlopen],
@@ -698,8 +692,8 @@ enableval="yes"
698AC_MSG_CHECKING([whether to have OpenGL compositing support]) 692AC_MSG_CHECKING([whether to have OpenGL compositing support])
699AC_ARG_ENABLE(opengl-compositing, 693AC_ARG_ENABLE(opengl-compositing,
700 AC_HELP_STRING([--enable-opengl-compositing], 694 AC_HELP_STRING([--enable-opengl-compositing],
701 [OpenGL support for fbcompose [default=yes]]), , 695 [OpenGL support for fbcompose [default=no]]), ,
702 [enableval=yes]) 696 [enableval=no])
703if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then 697if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then
704 AC_MSG_RESULT([yes]) 698 AC_MSG_RESULT([yes])
705 AC_CHECK_LIB([dl], [dlopen], 699 AC_CHECK_LIB([dl], [dlopen],
diff --git a/util/fbcompose/OpenGLScreen.cc b/util/fbcompose/OpenGLScreen.cc
index c69b4d7..fc4494a 100644
--- a/util/fbcompose/OpenGLScreen.cc
+++ b/util/fbcompose/OpenGLScreen.cc
@@ -299,29 +299,29 @@ void OpenGLScreen::createResources() {
299 Pixmap pixmap; 299 Pixmap pixmap;
300 300
301 // Default element buffer. 301 // Default element buffer.
302 m_default_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); 302 m_default_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER));
303 m_default_element_buffer->bufferData(sizeof(DEFAULT_ELEMENT_ARRAY), (const GLvoid*)(DEFAULT_ELEMENT_ARRAY), GL_STATIC_DRAW); 303 m_default_element_buffer->bufferData(sizeof(DEFAULT_ELEMENT_ARRAY), (const GLvoid*)(DEFAULT_ELEMENT_ARRAY), GL_STATIC_DRAW);
304 304
305 // Default primitive position buffer. 305 // Default primitive position buffer.
306 m_default_prim_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 306 m_default_prim_pos_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER));
307 m_default_prim_pos_buffer->bufferData(sizeof(DEFAULT_PRIM_POS_ARRAY), (const GLvoid*)(DEFAULT_PRIM_POS_ARRAY), GL_STATIC_DRAW); 307 m_default_prim_pos_buffer->bufferData(sizeof(DEFAULT_PRIM_POS_ARRAY), (const GLvoid*)(DEFAULT_PRIM_POS_ARRAY), GL_STATIC_DRAW);
308 308
309 // Default texture position buffer. 309 // Default texture position buffer.
310 m_default_tex_coord_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 310 m_default_tex_coord_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER));
311 m_default_tex_coord_buffer->bufferData(sizeof(DEFAULT_TEX_POS_ARRAY), (const GLvoid*)(DEFAULT_TEX_POS_ARRAY), GL_STATIC_DRAW); 311 m_default_tex_coord_buffer->bufferData(sizeof(DEFAULT_TEX_POS_ARRAY), (const GLvoid*)(DEFAULT_TEX_POS_ARRAY), GL_STATIC_DRAW);
312 312
313 313
314 // Reconfigure rectangle position buffer. 314 // Reconfigure rectangle position buffer.
315 m_rec_rect_line_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); 315 m_rec_rect_line_pos_buffer.reset( new OpenGLBuffer(*this, GL_ARRAY_BUFFER) );
316 316
317 // Reconfigure rectangle element buffer. 317 // Reconfigure rectangle element buffer.
318 m_rec_rect_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); 318 m_rec_rect_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER));
319 m_rec_rect_element_buffer->bufferData(sizeof(RECONFIGURE_RECT_ELEMENT_ARRAY), 319 m_rec_rect_element_buffer->bufferData(sizeof(RECONFIGURE_RECT_ELEMENT_ARRAY),
320 (const GLvoid*)(RECONFIGURE_RECT_ELEMENT_ARRAY), GL_STATIC_DRAW); 320 (const GLvoid*)(RECONFIGURE_RECT_ELEMENT_ARRAY), GL_STATIC_DRAW);
321 321
322 322
323 // Background texture. 323 // Background texture.
324 m_bg_texture = new OpenGL2DTexturePartition(*this, true); 324 m_bg_texture.reset( new OpenGL2DTexturePartition(*this, true) );
325 325
326 // Background texture partition buffers. 326 // Background texture partition buffers.
327 m_bg_pos_buffers = partitionSpaceToBuffers(*this, 0, 0, rootWindow().width(), rootWindow().height()); 327 m_bg_pos_buffers = partitionSpaceToBuffers(*this, 0, 0, rootWindow().width(), rootWindow().height());
@@ -329,13 +329,13 @@ void OpenGLScreen::createResources() {
329 329
330 // Plain black texture. 330 // Plain black texture.
331 pixmap = createSolidPixmap(*this, 1, 1, 0x00000000); 331 pixmap = createSolidPixmap(*this, 1, 1, 0x00000000);
332 m_black_texture = new OpenGL2DTexture(*this, false); 332 m_black_texture.reset( new OpenGL2DTexture(*this, false) );
333 m_black_texture->setPixmap(pixmap, false, 1, 1, true); 333 m_black_texture->setPixmap(pixmap, false, 1, 1, true);
334 XFreePixmap(display(), pixmap); 334 XFreePixmap(display(), pixmap);
335 335
336 // Plain white texture. 336 // Plain white texture.
337 pixmap = createSolidPixmap(*this, 1, 1, 0xffffffff); 337 pixmap = createSolidPixmap(*this, 1, 1, 0xffffffff);
338 m_white_texture = new OpenGL2DTexture(*this, false); 338 m_white_texture.reset( new OpenGL2DTexture(*this, false) );
339 m_white_texture->setPixmap(pixmap, false, 1, 1, true); 339 m_white_texture->setPixmap(pixmap, false, 1, 1, true);
340 XFreePixmap(display(), pixmap); 340 XFreePixmap(display(), pixmap);
341} 341}
@@ -354,7 +354,7 @@ void OpenGLScreen::initPlugins() {
354// Initializes the screen's plugins. 354// Initializes the screen's plugins.
355void OpenGLScreen::initPlugins(const CompositorConfig &config) { 355void OpenGLScreen::initPlugins(const CompositorConfig &config) {
356 BaseScreen::initPlugins(config); 356 BaseScreen::initPlugins(config);
357 m_shader_program = new OpenGLShaderProgram(pluginManager().plugins()); 357 m_shader_program.reset( new OpenGLShaderProgram(pluginManager().plugins()) );
358} 358}
359 359
360 360
diff --git a/util/fbcompose/OpenGLTexPartitioner.cc b/util/fbcompose/OpenGLTexPartitioner.cc
index 9ff810b..6d01c9d 100644
--- a/util/fbcompose/OpenGLTexPartitioner.cc
+++ b/util/fbcompose/OpenGLTexPartitioner.cc
@@ -73,7 +73,7 @@ void OpenGL2DTexturePartition::setPixmap(Pixmap pixmap, bool manage_pixmap, int
73 while ((size_t)(total_units) > m_partitions.size()) { 73 while ((size_t)(total_units) > m_partitions.size()) {
74 TexturePart partition; 74 TexturePart partition;
75 partition.borders = 0; 75 partition.borders = 0;
76 partition.texture = new OpenGL2DTexture(m_screen, m_swizzle_alpha_to_one); 76 partition.texture.reset( new OpenGL2DTexture(m_screen, m_swizzle_alpha_to_one) );
77 m_partitions.push_back(partition); 77 m_partitions.push_back(partition);
78 } 78 }
79 while ((size_t)(total_units) < m_partitions.size()) { 79 while ((size_t)(total_units) < m_partitions.size()) {
diff --git a/util/fbcompose/OpenGLWindow.cc b/util/fbcompose/OpenGLWindow.cc
index a0977af..070a9b8 100644
--- a/util/fbcompose/OpenGLWindow.cc
+++ b/util/fbcompose/OpenGLWindow.cc
@@ -43,8 +43,8 @@ using namespace FbCompositor;
43OpenGLWindow::OpenGLWindow(const OpenGLScreen &screen, Window window_xid) : 43OpenGLWindow::OpenGLWindow(const OpenGLScreen &screen, Window window_xid) :
44 BaseCompWindow(static_cast<const BaseScreen&>(screen), window_xid, false) { 44 BaseCompWindow(static_cast<const BaseScreen&>(screen), window_xid, false) {
45 45
46 m_content_tex_partition = new OpenGL2DTexturePartition(screen, true); 46 m_content_tex_partition.reset( new OpenGL2DTexturePartition(screen, true) );
47 m_shape_tex_partition = new OpenGL2DTexturePartition(screen, false); 47 m_shape_tex_partition.reset( new OpenGL2DTexturePartition(screen, false) );
48 48
49 updateWindowPos(); 49 updateWindowPos();
50} 50}
diff --git a/util/fbcompose/XRenderScreen.cc b/util/fbcompose/XRenderScreen.cc
index 2450576..f6dea8d 100644
--- a/util/fbcompose/XRenderScreen.cc
+++ b/util/fbcompose/XRenderScreen.cc
@@ -116,14 +116,15 @@ void XRenderScreen::initRenderingSurface() {
116 throw InitException("Cannot find the required picture format."); 116 throw InitException("Cannot find the required picture format.");
117 } 117 }
118 118
119 m_rendering_picture = new XRenderPicture(*this, rendering_pict_format, m_pict_filter); 119 m_rendering_picture.reset( new XRenderPicture(*this, rendering_pict_format, m_pict_filter) );
120 m_rendering_picture->setWindow(m_rendering_window, pa, pa_mask); 120 m_rendering_picture->setWindow(m_rendering_window, pa, pa_mask);
121 121
122 // Create the back buffer. 122 // Create the back buffer.
123 XRenderPictFormat *back_buffer_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32); 123 XRenderPictFormat *back_buffer_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32);
124 Pixmap back_buffer_pixmap = XCreatePixmap(display(), rootWindow().window(), rootWindow().width(), rootWindow().height(), 32); 124 Pixmap back_buffer_pixmap = XCreatePixmap(display(), rootWindow().window(), rootWindow().width(), rootWindow().height(), 32);
125 125
126 m_back_buffer_picture = new XRenderPicture(*this, back_buffer_pict_format, m_pict_filter); 126 m_back_buffer_picture.reset(
127 new XRenderPicture(*this, back_buffer_pict_format, m_pict_filter));
127 m_back_buffer_picture->setPixmap(back_buffer_pixmap, true, pa, pa_mask); 128 m_back_buffer_picture->setPixmap(back_buffer_pixmap, true, pa, pa_mask);
128} 129}
129 130
@@ -171,7 +172,7 @@ void XRenderScreen::updateBackgroundPicture() {
171 long pa_mask = CPSubwindowMode; 172 long pa_mask = CPSubwindowMode;
172 173
173 if (!m_root_picture) { 174 if (!m_root_picture) {
174 m_root_picture = new XRenderPicture(*this, pict_format, m_pict_filter); 175 m_root_picture.reset( new XRenderPicture(*this, pict_format, m_pict_filter) );
175 } else { 176 } else {
176 m_root_picture->setPictFormat(pict_format); 177 m_root_picture->setPictFormat(pict_format);
177 } 178 }
diff --git a/util/fbcompose/XRenderWindow.cc b/util/fbcompose/XRenderWindow.cc
index eb4d672..499ffec 100644
--- a/util/fbcompose/XRenderWindow.cc
+++ b/util/fbcompose/XRenderWindow.cc
@@ -38,10 +38,10 @@ XRenderWindow::XRenderWindow(const XRenderScreen &screen, Window window_xid, con
38 m_pict_filter(pict_filter) { 38 m_pict_filter(pict_filter) {
39 39
40 XRenderPictFormat *content_pict_format = XRenderFindVisualFormat(display(), visual()); 40 XRenderPictFormat *content_pict_format = XRenderFindVisualFormat(display(), visual());
41 m_content_picture = new XRenderPicture(screen, content_pict_format, m_pict_filter); 41 m_content_picture.reset( new XRenderPicture(screen, content_pict_format, m_pict_filter) );
42 42
43 XRenderPictFormat *mask_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32); 43 XRenderPictFormat *mask_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32);
44 m_mask_picture = new XRenderPicture(screen, mask_pict_format, m_pict_filter); 44 m_mask_picture.reset( new XRenderPicture(screen, mask_pict_format, m_pict_filter) );
45} 45}
46 46
47// Destructor. 47// Destructor.
diff --git a/util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc b/util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc
index 97faf34..6448f92 100644
--- a/util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc
+++ b/util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc
@@ -96,7 +96,8 @@ void PreviewPlugin::windowCreated(const BaseCompWindow &window) {
96 const OpenGLWindow &gl_window = dynamic_cast<const OpenGLWindow&>(window); 96 const OpenGLWindow &gl_window = dynamic_cast<const OpenGLWindow&>(window);
97 97
98 OpenGLRenderingJob job; 98 OpenGLRenderingJob job;
99 job.prim_pos_buffer = new OpenGLBuffer(openGLScreen(), GL_ARRAY_BUFFER); 99 job.prim_pos_buffer.reset(
100 new OpenGLBuffer(openGLScreen(), GL_ARRAY_BUFFER));
100 job.main_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer(); 101 job.main_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer();
101 job.shape_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer(); 102 job.shape_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer();
102 job.alpha = PREVIEW_ALPHA / 255.0f; 103 job.alpha = PREVIEW_ALPHA / 255.0f;
diff --git a/util/fbcompose/plugins/xrender/fade/FadePlugin.cc b/util/fbcompose/plugins/xrender/fade/FadePlugin.cc
index ac01189..e9fd97c 100644
--- a/util/fbcompose/plugins/xrender/fade/FadePlugin.cc
+++ b/util/fbcompose/plugins/xrender/fade/FadePlugin.cc
@@ -74,7 +74,10 @@ void FadePlugin::windowMapped(const BaseCompWindow &window) {
74 while (true) { 74 while (true) {
75 if (it == m_negative_fades.end()) { 75 if (it == m_negative_fades.end()) {
76 fade.fade_alpha = 0; 76 fade.fade_alpha = 0;
77 fade.fade_picture = new XRenderPicture(xrenderScreen(), m_fade_pict_format, xrenderScreen().pictFilter()); 77 fade.fade_picture.reset(
78 new XRenderPicture(
79 xrenderScreen(), m_fade_pict_format,
80 xrenderScreen().pictFilter()));
78 break; 81 break;
79 } else if (it->window_id == window.window()) { 82 } else if (it->window_id == window.window()) {
80 fade.fade_alpha = it->fade_alpha; 83 fade.fade_alpha = it->fade_alpha;
@@ -105,7 +108,8 @@ void FadePlugin::windowUnmapped(const BaseCompWindow &window) {
105 m_positive_fades.erase(it); 108 m_positive_fades.erase(it);
106 } else { 109 } else {
107 fade.fade_alpha = 255; 110 fade.fade_alpha = 255;
108 fade.fade_picture = new XRenderPicture(xrenderScreen(), m_fade_pict_format, xrenderScreen().pictFilter()); 111 fade.fade_picture.reset( new XRenderPicture(xrenderScreen(),
112 m_fade_pict_format, xrenderScreen().pictFilter()));
109 } 113 }
110 114
111 if (xr_window.contentPicture()->pictureHandle() != None) { 115 if (xr_window.contentPicture()->pictureHandle() != None) {
diff --git a/util/fbcompose/plugins/xrender/preview/PreviewPlugin.cc b/util/fbcompose/plugins/xrender/preview/PreviewPlugin.cc
index 14a0e61..fdc4d29 100644
--- a/util/fbcompose/plugins/xrender/preview/PreviewPlugin.cc
+++ b/util/fbcompose/plugins/xrender/preview/PreviewPlugin.cc
@@ -59,7 +59,7 @@ PreviewPlugin::PreviewPlugin(const BaseScreen &screen, const std::vector<FbTk::F
59 unsigned long mask_color = 0x01010101 * PREVIEW_ALPHA; 59 unsigned long mask_color = 0x01010101 * PREVIEW_ALPHA;
60 Pixmap mask_pixmap = createSolidPixmap(screen, MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT, mask_color); 60 Pixmap mask_pixmap = createSolidPixmap(screen, MAX_PREVIEW_WIDTH, MAX_PREVIEW_HEIGHT, mask_color);
61 XRenderPictFormat *pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32); 61 XRenderPictFormat *pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32);
62 m_mask_picture = new XRenderPicture(xrenderScreen(), pict_format, FilterFast); 62 m_mask_picture.reset( new XRenderPicture(xrenderScreen(), pict_format, FilterFast));
63 m_mask_picture->setPixmap(mask_pixmap, true); 63 m_mask_picture->setPixmap(mask_pixmap, true);
64 64
65 m_previous_damage.width = 0; 65 m_previous_damage.width = 0;