Remove some old Centos 5 support.
authorCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 19:36:07 +0000 (21:36 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 19:36:07 +0000 (21:36 +0200)
src/lib/render_text.cc
wscript

index d4d827a6b23c1b629408a007a4401bb9a523cf00..e47098ee906916da55ce02ba71686a6c486726d0 100644 (file)
@@ -34,9 +34,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <pangomm.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <pango/pangocairo.h>
 #include <pangomm.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <pango/pangocairo.h>
-#ifndef DCPOMATIC_HAVE_SHOW_IN_CAIRO_CONTEXT
-#include <pango/pangocairo.h>
-#endif
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 
@@ -112,8 +109,7 @@ create_image (dcp::Size size)
 static Cairo::RefPtr<Cairo::ImageSurface>
 create_surface (shared_ptr<Image> image)
 {
 static Cairo::RefPtr<Cairo::ImageSurface>
 create_surface (shared_ptr<Image> image)
 {
-#ifdef DCPOMATIC_HAVE_FORMAT_STRIDE_FOR_WIDTH
-       auto surface = Cairo::ImageSurface::create (
+       return Cairo::ImageSurface::create (
                image->data()[0],
                Cairo::FORMAT_ARGB32,
                image->size().width,
                image->data()[0],
                Cairo::FORMAT_ARGB32,
                image->size().width,
@@ -121,20 +117,6 @@ create_surface (shared_ptr<Image> image)
                /* Cairo ARGB32 means first byte blue, second byte green, third byte red, fourth byte alpha */
                Cairo::ImageSurface::format_stride_for_width (Cairo::FORMAT_ARGB32, image->size().width)
                );
                /* Cairo ARGB32 means first byte blue, second byte green, third byte red, fourth byte alpha */
                Cairo::ImageSurface::format_stride_for_width (Cairo::FORMAT_ARGB32, image->size().width)
                );
-#else
-       /* Centos 5 does not have Cairo::ImageSurface::format_stride_for_width, so just use width * 4
-          which I hope is safe (if slow)
-       */
-       auto surface = Cairo::ImageSurface::create (
-               image->data()[0],
-               Cairo::FORMAT_ARGB32,
-               image->size().width,
-               image->size().height,
-               image->size().width * 4
-               );
-#endif
-
-       return surface;
 }
 
 
 }
 
 
diff --git a/wscript b/wscript
index 83148e368d2ad6907b9676e68cbfc7f60bed7f6a..c0b14cbf600325536b3de8f69dd23dddbcc8e99c 100644 (file)
--- a/wscript
+++ b/wscript
@@ -276,37 +276,6 @@ def configure(conf):
     # leqm_nrt
     conf.check_cfg(package='leqm_nrt', args='--cflags --libs', uselib_store='LEQM_NRT', mandatory=True)
 
     # leqm_nrt
     conf.check_cfg(package='leqm_nrt', args='--cflags --libs', uselib_store='LEQM_NRT', mandatory=True)
 
-    # See if we have Cairo::ImageSurface::format_stride_for_width; Centos 5 does not
-    conf.check_cxx(fragment="""
-                            #include <cairomm/cairomm.h>
-                            int main(void) {
-                                Cairo::ImageSurface::format_stride_for_width (Cairo::FORMAT_ARGB32, 1024);\n
-                                return 0; }\n
-                            """,
-                       mandatory=False,
-                       msg='Checking for format_stride_for_width',
-                       okmsg='yes',
-                       includes=conf.env['INCLUDES_CAIROMM'],
-                       uselib='CAIROMM',
-                       define_name='DCPOMATIC_HAVE_FORMAT_STRIDE_FOR_WIDTH')
-
-    # See if we have Pango::Layout::show_in_cairo_context; Centos 5 does not
-    conf.check_cxx(fragment="""
-                            #include <pangomm.h>
-                            int main(void) {
-                                Cairo::RefPtr<Cairo::Context> context;
-                                Glib::RefPtr<Pango::Layout> layout;
-                                layout->show_in_cairo_context (context);
-                                return 0; }\n
-                            """,
-                       mandatory=False,
-                       msg='Checking for show_in_cairo_context',
-                       okmsg='yes',
-                       includes=conf.env['INCLUDES_PANGOMM'],
-                       uselib='PANGOMM',
-                       define_name='DCPOMATIC_HAVE_SHOW_IN_CAIRO_CONTEXT')
-
-
     # libcxml
     if conf.options.static_cxml:
         conf.check_cfg(package='libcxml', atleast_version='0.17.0', args='--cflags', uselib_store='CXML', mandatory=True)
     # libcxml
     if conf.options.static_cxml:
         conf.check_cfg(package='libcxml', atleast_version='0.17.0', args='--cflags', uselib_store='CXML', mandatory=True)