From 5e75c312050185267b05388a3991b932b447a75f Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sat, 10 Dec 2011 11:43:24 -0500 Subject: Fixing up the branch to use some of the changes that were made since the fork. The operator "=" was ditched in favor of .reset( because (I'm quoting here): "it was an accident waiting to happen". Well. It builds now. --- configure.in | 16 +++++----------- util/fbcompose/OpenGLScreen.cc | 18 +++++++++--------- util/fbcompose/OpenGLTexPartitioner.cc | 2 +- util/fbcompose/OpenGLWindow.cc | 4 ++-- util/fbcompose/XRenderScreen.cc | 7 ++++--- util/fbcompose/XRenderWindow.cc | 4 ++-- util/fbcompose/plugins/opengl/preview/PreviewPlugin.cc | 3 ++- util/fbcompose/plugins/xrender/fade/FadePlugin.cc | 8 ++++++-- .../fbcompose/plugins/xrender/preview/PreviewPlugin.cc | 2 +- 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, ) AC_SUBST(NLS) - - - - - dnl Check for new timed pixmap cache AC_MSG_CHECKING([whether to use the new timed pixmap cache]) AC_ARG_ENABLE( @@ -372,7 +367,6 @@ AC_ARG_ENABLE( AC_DEFINE(TIMEDCACHE, 1, "timed cache") ) - AC_MSG_CHECKING([whether to have Xft support]) AM_PATH_XFT(yes, XFT=true, @@ -640,7 +634,7 @@ enableval="yes" AC_MSG_CHECKING([whether fbcompose should be built]) AC_ARG_ENABLE(fbcompose, AC_HELP_STRING([--enable-fbcompose], - [build the fluxbox compositor [default=yes]]), , + [build the fluxbox compositor (ALPHA QUALITY) [default=no]]), , [enableval=yes]) if test "x$enableval" = "xyes"; then AC_MSG_RESULT([yes]) @@ -665,8 +659,8 @@ enableval="yes" AC_MSG_CHECKING([whether to have XRender compositing support]) AC_ARG_ENABLE(xrender-compositing, AC_HELP_STRING([--enable-xrender-compositing], - [XRender support for fbcompose [default=yes]]), , - [enableval=yes]) + [XRender support for fbcompose [default=no]]), , + [enableval=no]) if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then AC_MSG_RESULT([yes]) AC_CHECK_LIB([dl], [dlopen], @@ -698,8 +692,8 @@ enableval="yes" AC_MSG_CHECKING([whether to have OpenGL compositing support]) AC_ARG_ENABLE(opengl-compositing, AC_HELP_STRING([--enable-opengl-compositing], - [OpenGL support for fbcompose [default=yes]]), , - [enableval=yes]) + [OpenGL support for fbcompose [default=no]]), , + [enableval=no]) if test "x$enableval" = "xyes" -a "x$BUILD_FBCOMPOSE" = "xtrue"; then AC_MSG_RESULT([yes]) 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() { Pixmap pixmap; // Default element buffer. - m_default_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); + m_default_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER)); m_default_element_buffer->bufferData(sizeof(DEFAULT_ELEMENT_ARRAY), (const GLvoid*)(DEFAULT_ELEMENT_ARRAY), GL_STATIC_DRAW); // Default primitive position buffer. - m_default_prim_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); + m_default_prim_pos_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER)); m_default_prim_pos_buffer->bufferData(sizeof(DEFAULT_PRIM_POS_ARRAY), (const GLvoid*)(DEFAULT_PRIM_POS_ARRAY), GL_STATIC_DRAW); // Default texture position buffer. - m_default_tex_coord_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); + m_default_tex_coord_buffer.reset(new OpenGLBuffer(*this, GL_ARRAY_BUFFER)); m_default_tex_coord_buffer->bufferData(sizeof(DEFAULT_TEX_POS_ARRAY), (const GLvoid*)(DEFAULT_TEX_POS_ARRAY), GL_STATIC_DRAW); // Reconfigure rectangle position buffer. - m_rec_rect_line_pos_buffer = new OpenGLBuffer(*this, GL_ARRAY_BUFFER); + m_rec_rect_line_pos_buffer.reset( new OpenGLBuffer(*this, GL_ARRAY_BUFFER) ); // Reconfigure rectangle element buffer. - m_rec_rect_element_buffer = new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER); + m_rec_rect_element_buffer.reset(new OpenGLBuffer(*this, GL_ELEMENT_ARRAY_BUFFER)); m_rec_rect_element_buffer->bufferData(sizeof(RECONFIGURE_RECT_ELEMENT_ARRAY), (const GLvoid*)(RECONFIGURE_RECT_ELEMENT_ARRAY), GL_STATIC_DRAW); // Background texture. - m_bg_texture = new OpenGL2DTexturePartition(*this, true); + m_bg_texture.reset( new OpenGL2DTexturePartition(*this, true) ); // Background texture partition buffers. m_bg_pos_buffers = partitionSpaceToBuffers(*this, 0, 0, rootWindow().width(), rootWindow().height()); @@ -329,13 +329,13 @@ void OpenGLScreen::createResources() { // Plain black texture. pixmap = createSolidPixmap(*this, 1, 1, 0x00000000); - m_black_texture = new OpenGL2DTexture(*this, false); + m_black_texture.reset( new OpenGL2DTexture(*this, false) ); m_black_texture->setPixmap(pixmap, false, 1, 1, true); XFreePixmap(display(), pixmap); // Plain white texture. pixmap = createSolidPixmap(*this, 1, 1, 0xffffffff); - m_white_texture = new OpenGL2DTexture(*this, false); + m_white_texture.reset( new OpenGL2DTexture(*this, false) ); m_white_texture->setPixmap(pixmap, false, 1, 1, true); XFreePixmap(display(), pixmap); } @@ -354,7 +354,7 @@ void OpenGLScreen::initPlugins() { // Initializes the screen's plugins. void OpenGLScreen::initPlugins(const CompositorConfig &config) { BaseScreen::initPlugins(config); - m_shader_program = new OpenGLShaderProgram(pluginManager().plugins()); + m_shader_program.reset( new OpenGLShaderProgram(pluginManager().plugins()) ); } 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 while ((size_t)(total_units) > m_partitions.size()) { TexturePart partition; partition.borders = 0; - partition.texture = new OpenGL2DTexture(m_screen, m_swizzle_alpha_to_one); + partition.texture.reset( new OpenGL2DTexture(m_screen, m_swizzle_alpha_to_one) ); m_partitions.push_back(partition); } 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; OpenGLWindow::OpenGLWindow(const OpenGLScreen &screen, Window window_xid) : BaseCompWindow(static_cast(screen), window_xid, false) { - m_content_tex_partition = new OpenGL2DTexturePartition(screen, true); - m_shape_tex_partition = new OpenGL2DTexturePartition(screen, false); + m_content_tex_partition.reset( new OpenGL2DTexturePartition(screen, true) ); + m_shape_tex_partition.reset( new OpenGL2DTexturePartition(screen, false) ); updateWindowPos(); } 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() { throw InitException("Cannot find the required picture format."); } - m_rendering_picture = new XRenderPicture(*this, rendering_pict_format, m_pict_filter); + m_rendering_picture.reset( new XRenderPicture(*this, rendering_pict_format, m_pict_filter) ); m_rendering_picture->setWindow(m_rendering_window, pa, pa_mask); // Create the back buffer. XRenderPictFormat *back_buffer_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32); Pixmap back_buffer_pixmap = XCreatePixmap(display(), rootWindow().window(), rootWindow().width(), rootWindow().height(), 32); - m_back_buffer_picture = new XRenderPicture(*this, back_buffer_pict_format, m_pict_filter); + m_back_buffer_picture.reset( + new XRenderPicture(*this, back_buffer_pict_format, m_pict_filter)); m_back_buffer_picture->setPixmap(back_buffer_pixmap, true, pa, pa_mask); } @@ -171,7 +172,7 @@ void XRenderScreen::updateBackgroundPicture() { long pa_mask = CPSubwindowMode; if (!m_root_picture) { - m_root_picture = new XRenderPicture(*this, pict_format, m_pict_filter); + m_root_picture.reset( new XRenderPicture(*this, pict_format, m_pict_filter) ); } else { m_root_picture->setPictFormat(pict_format); } 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 m_pict_filter(pict_filter) { XRenderPictFormat *content_pict_format = XRenderFindVisualFormat(display(), visual()); - m_content_picture = new XRenderPicture(screen, content_pict_format, m_pict_filter); + m_content_picture.reset( new XRenderPicture(screen, content_pict_format, m_pict_filter) ); XRenderPictFormat *mask_pict_format = XRenderFindStandardFormat(display(), PictStandardARGB32); - m_mask_picture = new XRenderPicture(screen, mask_pict_format, m_pict_filter); + m_mask_picture.reset( new XRenderPicture(screen, mask_pict_format, m_pict_filter) ); } // 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) { const OpenGLWindow &gl_window = dynamic_cast(window); OpenGLRenderingJob job; - job.prim_pos_buffer = new OpenGLBuffer(openGLScreen(), GL_ARRAY_BUFFER); + job.prim_pos_buffer.reset( + new OpenGLBuffer(openGLScreen(), GL_ARRAY_BUFFER)); job.main_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer(); job.shape_tex_coord_buffer = openGLScreen().defaultTexCoordBuffer(); 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) { while (true) { if (it == m_negative_fades.end()) { fade.fade_alpha = 0; - fade.fade_picture = new XRenderPicture(xrenderScreen(), m_fade_pict_format, xrenderScreen().pictFilter()); + fade.fade_picture.reset( + new XRenderPicture( + xrenderScreen(), m_fade_pict_format, + xrenderScreen().pictFilter())); break; } else if (it->window_id == window.window()) { fade.fade_alpha = it->fade_alpha; @@ -105,7 +108,8 @@ void FadePlugin::windowUnmapped(const BaseCompWindow &window) { m_positive_fades.erase(it); } else { fade.fade_alpha = 255; - fade.fade_picture = new XRenderPicture(xrenderScreen(), m_fade_pict_format, xrenderScreen().pictFilter()); + fade.fade_picture.reset( new XRenderPicture(xrenderScreen(), + m_fade_pict_format, xrenderScreen().pictFilter())); } 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::vectorsetPixmap(mask_pixmap, true); m_previous_damage.width = 0; -- cgit v0.11.2