diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2012-02-13 09:27:56 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2012-02-13 09:27:56 +0000 |
| commit | 33e08823fec6157953453a938b10e2c731c8e1df (patch) | |
| tree | f0c0214357fb5faeef6e2214d075384e72eccb8f /src/display | |
| parent | Fix wrong placement in authors (diff) | |
| download | inkscape-33e08823fec6157953453a938b10e2c731c8e1df.tar.gz inkscape-33e08823fec6157953453a938b10e2c731c8e1df.zip | |
Enable LCMS2 for other than OSX, where it still has some issues. Fixes bug #885324.
Fixed bugs:
- https://launchpad.net/bugs/885324
(bzr r10969)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/nr-filter-flood.cpp | 5 | ||||
| -rw-r--r-- | src/display/sp-canvas.cpp | 10 | ||||
| -rw-r--r-- | src/display/sp-canvas.h | 4 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src/display/nr-filter-flood.cpp b/src/display/nr-filter-flood.cpp index 7db14737b..449255133 100644 --- a/src/display/nr-filter-flood.cpp +++ b/src/display/nr-filter-flood.cpp @@ -43,7 +43,8 @@ void FilterFlood::render_cairo(FilterSlot &slot) double b = SP_RGBA32_B_F(color); double a = opacity; - #if ENABLE_LCMS +#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) + if (icc) { guchar ru, gu, bu; icc_color_to_sRGB(icc, &ru, &gu, &bu); @@ -51,7 +52,7 @@ void FilterFlood::render_cairo(FilterSlot &slot) g = SP_COLOR_U_TO_F(gu); b = SP_COLOR_U_TO_F(bu); } - #endif +#endif cairo_surface_t *out = ink_cairo_surface_create_same_size(input, CAIRO_CONTENT_COLOR_ALPHA); cairo_t *ct = cairo_create(out); diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 4a3022d84..53d14200a 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1203,10 +1203,10 @@ void SPCanvasImpl::init(SPCanvas *canvas) canvas->forced_redraw_count = 0; canvas->forced_redraw_limit = -1; -#if ENABLE_LCMS +#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) canvas->enable_cms_display_adj = false; new (&canvas->cms_key) Glib::ustring(""); -#endif // ENABLE_LCMS +#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) canvas->is_scrolling = false; } @@ -1252,7 +1252,7 @@ void SPCanvasImpl::destroy(GtkObject *object) } shutdown_transients(canvas); -#if ENABLE_LCMS +#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) canvas->cms_key.~ustring(); #endif if (GTK_OBJECT_CLASS(parentClass)->destroy) { @@ -1786,7 +1786,7 @@ void SPCanvasImpl::sp_canvas_paint_single_buffer(SPCanvas *canvas, Geom::IntRect // output to X cairo_destroy(buf.ct); -#if ENABLE_LCMS +#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) if (canvas->enable_cms_display_adj) { cmsHTRANSFORM transf = 0; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); @@ -1808,7 +1808,7 @@ void SPCanvasImpl::sp_canvas_paint_single_buffer(SPCanvas *canvas, Geom::IntRect cairo_surface_mark_dirty(imgs); } } -#endif // ENABLE_LCMS +#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) cairo_t *xct = gdk_cairo_create(gtk_widget_get_window (widget)); cairo_translate(xct, paint_rect.left() - canvas->x0, paint_rect.top() - canvas->y0); diff --git a/src/display/sp-canvas.h b/src/display/sp-canvas.h index 3bdd5c061..f0366a2e5 100644 --- a/src/display/sp-canvas.h +++ b/src/display/sp-canvas.h @@ -184,10 +184,10 @@ struct SPCanvas { int rendermode; int colorrendermode; -#if ENABLE_LCMS +#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) bool enable_cms_display_adj; Glib::ustring cms_key; -#endif // ENABLE_LCMS +#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) bool is_scrolling; |
