Double key image cache by requesting origin, and store CORS status with cached images.

This commit is contained in:
Josh Matthews 2019-10-01 13:11:50 -04:00
parent ea46008288
commit 81a67aed9e
11 changed files with 132 additions and 57 deletions

View file

@ -22,6 +22,7 @@ use ipc_channel::ipc;
use libc::c_void;
use msg::constellation_msg::{PipelineId, PipelineIndex, PipelineNamespaceId};
use net_traits::image::base::Image;
use net_traits::image_cache::CorsStatus;
use num_traits::FromPrimitive;
#[cfg(feature = "gl")]
use pixels::PixelFormat;
@ -1384,6 +1385,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
format: PixelFormat::RGB8,
bytes: ipc::IpcSharedMemory::from_bytes(&*img),
id: None,
cors_status: CorsStatus::Safe,
})
},
#[cfg(feature = "gl")]