mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #11083 - kevgs:image_metadata, r=Ms2ger
move struct ImageMetadata to a better place <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11083) <!-- Reviewable:end -->
This commit is contained in:
commit
33fa63a3c5
3 changed files with 9 additions and 8 deletions
|
@ -220,12 +220,6 @@ pub enum PixelFormat {
|
|||
RGBA8, // RGB + alpha, 8 bits per channel
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize, HeapSizeOf)]
|
||||
pub struct ImageMetadata {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
|
||||
pub struct Image {
|
||||
pub width: u32,
|
||||
|
|
|
@ -6,7 +6,13 @@ use ipc_channel::ipc::IpcSharedMemory;
|
|||
use piston_image::{self, DynamicImage, GenericImage, ImageFormat};
|
||||
use util::opts;
|
||||
|
||||
pub use msg::constellation_msg::{Image, ImageMetadata, PixelFormat};
|
||||
pub use msg::constellation_msg::{Image, PixelFormat};
|
||||
|
||||
#[derive(Clone, Deserialize, Eq, PartialEq, Serialize, HeapSizeOf)]
|
||||
pub struct ImageMetadata {
|
||||
pub width: u32,
|
||||
pub height: u32,
|
||||
}
|
||||
|
||||
// FIXME: Images must not be copied every frame. Instead we should atomically
|
||||
// reference count them.
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use image::base::ImageMetadata;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::{Image, ImageMetadata};
|
||||
use msg::constellation_msg::Image;
|
||||
use std::sync::Arc;
|
||||
use url::Url;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue