@@ -7,7 +7,7 @@ pub use iced_graphics::triangle::{Mesh2D, Vertex2D};
77use crate :: program:: { self , Shader } ;
88use crate :: Transformation ;
99
10- #[ cfg( feature = "image_rs " ) ]
10+ #[ cfg( feature = "image " ) ]
1111use iced_graphics:: image:: raster;
1212
1313#[ cfg( feature = "svg" ) ]
@@ -27,7 +27,7 @@ pub(crate) struct Pipeline {
2727 vertex_buffer : <glow:: Context as HasContext >:: Buffer ,
2828 transform_location : <glow:: Context as HasContext >:: UniformLocation ,
2929 storage : Storage ,
30- #[ cfg( feature = "image_rs " ) ]
30+ #[ cfg( feature = "image " ) ]
3131 raster_cache : RefCell < raster:: Cache < Storage > > ,
3232 #[ cfg( feature = "svg" ) ]
3333 vector_cache : RefCell < vector:: Cache < Storage > > ,
@@ -115,14 +115,14 @@ impl Pipeline {
115115 vertex_buffer,
116116 transform_location,
117117 storage : Storage :: default ( ) ,
118- #[ cfg( feature = "image_rs " ) ]
118+ #[ cfg( feature = "image " ) ]
119119 raster_cache : RefCell :: new ( raster:: Cache :: default ( ) ) ,
120120 #[ cfg( feature = "svg" ) ]
121121 vector_cache : RefCell :: new ( vector:: Cache :: default ( ) ) ,
122122 }
123123 }
124124
125- #[ cfg( feature = "image_rs " ) ]
125+ #[ cfg( feature = "image " ) ]
126126 pub fn dimensions ( & self , handle : & iced_native:: image:: Handle ) -> Size < u32 > {
127127 self . raster_cache . borrow_mut ( ) . load ( handle) . dimensions ( )
128128 }
@@ -151,20 +151,20 @@ impl Pipeline {
151151 gl. bind_buffer ( glow:: ARRAY_BUFFER , Some ( self . vertex_buffer ) ) ;
152152 }
153153
154- #[ cfg( feature = "image_rs " ) ]
154+ #[ cfg( feature = "image " ) ]
155155 let mut raster_cache = self . raster_cache . borrow_mut ( ) ;
156156
157157 #[ cfg( feature = "svg" ) ]
158158 let mut vector_cache = self . vector_cache . borrow_mut ( ) ;
159159
160160 for image in images {
161161 let ( entry, bounds) = match & image {
162- #[ cfg( feature = "image_rs " ) ]
162+ #[ cfg( feature = "image " ) ]
163163 layer:: Image :: Raster { handle, bounds } => (
164164 raster_cache. upload ( handle, & mut gl, & mut self . storage ) ,
165165 bounds,
166166 ) ,
167- #[ cfg( not( feature = "image_rs " ) ) ]
167+ #[ cfg( not( feature = "image " ) ) ]
168168 layer:: Image :: Raster { handle : _, bounds } => ( None , bounds) ,
169169
170170 #[ cfg( feature = "svg" ) ]
@@ -217,7 +217,7 @@ impl Pipeline {
217217 }
218218
219219 pub fn trim_cache ( & mut self , mut gl : & glow:: Context ) {
220- #[ cfg( feature = "image_rs " ) ]
220+ #[ cfg( feature = "image " ) ]
221221 self . raster_cache
222222 . borrow_mut ( )
223223 . trim ( & mut self . storage , & mut gl) ;
0 commit comments