Skip to content

Commit

Permalink
Remove obsolete Boost.Gil code.
Browse files Browse the repository at this point in the history
There's no longer any reason to carry around the Boost.Gil code (it's
been in mainline Boost for years), except for the numeric extension,
which we still provide.  However, this change organizes the #include
directories so that a system-provided numeric extension should be
automatically used if available.
  • Loading branch information
Timothy M. Shead committed May 27, 2010
1 parent c9eceee commit ce0064e
Show file tree
Hide file tree
Showing 68 changed files with 34 additions and 13,269 deletions.
16 changes: 9 additions & 7 deletions k3dsdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ CONFIGURE_FILE(${k3dsdk_SOURCE_DIR}/k3d-path-config.h.in ${k3dsdk_BINARY_DIR}/k3
CONFIGURE_FILE(${k3dsdk_SOURCE_DIR}/k3d-platform-config.h.in ${k3dsdk_BINARY_DIR}/k3d-platform-config.h)
CONFIGURE_FILE(${k3dsdk_SOURCE_DIR}/k3d-version-config.h.in ${k3dsdk_BINARY_DIR}/k3d-version-config.h)

INCLUDE_DIRECTORIES(${k3d_SOURCE_DIR})
INCLUDE_DIRECTORIES(${k3dsdk_SOURCE_DIR}/gil)
INCLUDE_DIRECTORIES(${k3dsdk_BINARY_DIR})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${K3D_GLIBMM_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${K3D_SIGC_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${K3D_OPENGL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(
${k3d_SOURCE_DIR}
${k3dsdk_BINARY_DIR}
${Boost_INCLUDE_DIRS}
${k3dsdk_SOURCE_DIR}/gil
${K3D_GLIBMM_INCLUDE_DIRS}
${K3D_SIGC_INCLUDE_DIRS}
${K3D_OPENGL_INCLUDE_DIR}
)

IF(K3D_ENABLE_PARALLEL)
INCLUDE_DIRECTORIES(${K3D_TBB_INCLUDE_DIR})
Expand Down
27 changes: 4 additions & 23 deletions k3dsdk/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ namespace boost
namespace gil
{

typedef half bits16f;

template<>
struct channel_traits<bits16f>
struct channel_traits<half>
{
typedef half value_type;
typedef half& reference;
Expand All @@ -55,32 +53,15 @@ struct channel_traits<bits16f>

static value_type min_value()
{
return bits16f(0.0f);
return half(0.0f);
}

static value_type max_value()
{
return bits16f(1.0f);
return half(1.0f);
}
};

GIL_DEFINE_BASE_TYPEDEFS(16f,gray)
GIL_DEFINE_BASE_TYPEDEFS(16f,bgr)
GIL_DEFINE_BASE_TYPEDEFS(16f,argb)
GIL_DEFINE_BASE_TYPEDEFS(16f,abgr)
GIL_DEFINE_BASE_TYPEDEFS(16f,bgra)

GIL_DEFINE_ALL_TYPEDEFS(16f,rgb)
GIL_DEFINE_ALL_TYPEDEFS(16f,rgba)
GIL_DEFINE_ALL_TYPEDEFS(16f,cmyk)

template <int N> struct devicen_t;
template <int N> struct devicen_layout_t;
GIL_DEFINE_ALL_TYPEDEFS_INTERNAL(16f,dev2n, devicen_t<2>, devicen_layout_t<2>)
GIL_DEFINE_ALL_TYPEDEFS_INTERNAL(16f,dev3n, devicen_t<3>, devicen_layout_t<3>)
GIL_DEFINE_ALL_TYPEDEFS_INTERNAL(16f,dev4n, devicen_t<4>, devicen_layout_t<4>)
GIL_DEFINE_ALL_TYPEDEFS_INTERNAL(16f,dev5n, devicen_t<5>, devicen_layout_t<5>)

} // namespace gil

} // namespace boost
Expand All @@ -89,7 +70,7 @@ namespace k3d
{

/// Defines a standard pixel as half-precision floating-point RGBA
typedef boost::gil::pixel<boost::gil::bits16f, boost::gil::rgba_layout_t> pixel;
typedef boost::gil::pixel<half, boost::gil::rgba_layout_t> pixel;
/// Defines a standard bitmap as half-precision floating-point RGBA
typedef boost::gil::image<pixel, false> bitmap;
/// Define storage for a pixel coordinate
Expand Down
Loading

1 comment on commit ce0064e

@AzP
Copy link

@AzP AzP commented on ce0064e Jun 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps time for a new official release so this change (which is 3 years old) makes it into distributions which are source based? Gentoo is one of the distributions which have to patch this by hand nowdays, to make it build with GCC-4.7.

Please sign in to comment.