[librsvg] Move srgb.rs in surface_utils



commit 387b0f8f579977b3c693da01e37b1f5447aa930b
Author: Paolo Borelli <pborelli gnome org>
Date:   Mon Jan 6 13:10:45 2020 +0100

    Move srgb.rs in surface_utils
    
    It operates on SharedImageSurface, so move it in the module.

 Makefile.am                                        | 2 +-
 po/POTFILES.in                                     | 2 +-
 rsvg_internals/benches/srgb.rs                     | 2 +-
 rsvg_internals/src/lib.rs                          | 1 -
 rsvg_internals/src/surface_utils/mod.rs            | 1 +
 rsvg_internals/src/surface_utils/shared_surface.rs | 2 +-
 rsvg_internals/src/{ => surface_utils}/srgb.rs     | 0
 7 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8a795cb4..69b3066a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -87,8 +87,8 @@ LIBRSVG_INTERNALS_SRC =                                               \
        rsvg_internals/src/surface_utils/iterators.rs           \
        rsvg_internals/src/surface_utils/mod.rs                 \
        rsvg_internals/src/surface_utils/shared_surface.rs      \
+       rsvg_internals/src/surface_utils/srgb.rs                \
        rsvg_internals/src/space.rs                             \
-       rsvg_internals/src/srgb.rs                              \
        rsvg_internals/src/structure.rs                         \
        rsvg_internals/src/style.rs                             \
        rsvg_internals/src/text.rs                              \
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 4b749b9f..c5591b34 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -70,13 +70,13 @@ rsvg_internals/src/property_macros.rs
 rsvg_internals/src/rect.rs
 rsvg_internals/src/shapes.rs
 rsvg_internals/src/space.rs
-rsvg_internals/src/srgb.rs
 rsvg_internals/src/state.rs
 rsvg_internals/src/structure.rs
 rsvg_internals/src/style.rs
 rsvg_internals/src/surface_utils/iterators.rs
 rsvg_internals/src/surface_utils/mod.rs
 rsvg_internals/src/surface_utils/shared_surface.rs
+rsvg_internals/src/surface_utils/srgb.rs
 rsvg_internals/src/text.rs
 rsvg_internals/src/transform.rs
 rsvg_internals/src/tree.rs
diff --git a/rsvg_internals/benches/srgb.rs b/rsvg_internals/benches/srgb.rs
index 55363de0..c240d3a8 100644
--- a/rsvg_internals/benches/srgb.rs
+++ b/rsvg_internals/benches/srgb.rs
@@ -3,9 +3,9 @@ extern crate criterion;
 use criterion::{black_box, Criterion};
 
 use rsvg_internals::rect::IRect;
-use rsvg_internals::srgb::{linearize, map_unpremultiplied_components_loop};
 use rsvg_internals::surface_utils::{
     shared_surface::{SharedImageSurface, SurfaceType},
+    srgb::{linearize, map_unpremultiplied_components_loop},
     ImageSurfaceDataExt, Pixel,
 };
 
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 35f3bd3e..4fc29d48 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -114,7 +114,6 @@ mod property_defs;
 pub mod rect;
 mod shapes;
 mod space;
-pub mod srgb;
 mod structure;
 mod style;
 pub mod surface_utils;
diff --git a/rsvg_internals/src/surface_utils/mod.rs b/rsvg_internals/src/surface_utils/mod.rs
index 025fc40f..59eb363f 100644
--- a/rsvg_internals/src/surface_utils/mod.rs
+++ b/rsvg_internals/src/surface_utils/mod.rs
@@ -4,6 +4,7 @@ use std::ops::DerefMut;
 
 pub mod iterators;
 pub mod shared_surface;
+pub mod srgb;
 
 /// A pixel consisting of R, G, B and A values.
 #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
diff --git a/rsvg_internals/src/surface_utils/shared_surface.rs 
b/rsvg_internals/src/surface_utils/shared_surface.rs
index 31c126a8..f36dd9da 100644
--- a/rsvg_internals/src/surface_utils/shared_surface.rs
+++ b/rsvg_internals/src/surface_utils/shared_surface.rs
@@ -9,7 +9,7 @@ use glib::translate::{Stash, ToGlibPtr};
 use nalgebra::{storage::Storage, Dim, Matrix};
 
 use crate::rect::IRect;
-use crate::srgb;
+use crate::surface_utils::srgb;
 use crate::unit_interval::UnitInterval;
 use crate::util::clamp;
 
diff --git a/rsvg_internals/src/srgb.rs b/rsvg_internals/src/surface_utils/srgb.rs
similarity index 100%
rename from rsvg_internals/src/srgb.rs
rename to rsvg_internals/src/surface_utils/srgb.rs


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]