Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing recursion from ComplexSelector WIP #16227

Closed
wants to merge 6 commits into from

Move image cache implementation to the net crate

  • Loading branch information
ferjm authored and Matthew committed Apr 6, 2017
commit e4b76716ff9f9377feca12843ee6e9b5ec06a423

Some generated files are not rendered by default. Learn more.

@@ -24,6 +24,7 @@ ipc-channel = "0.7"
layout_traits = {path = "../layout_traits"}
log = "0.3.5"
msg = {path = "../msg"}
net = {path = "../net"}
net_traits = {path = "../net_traits"}
offscreen_gl_context = "0.8"
profile_traits = {path = "../profile_traits"}
@@ -24,6 +24,7 @@ extern crate layout_traits;
#[macro_use]
extern crate log;
extern crate msg;
extern crate net;
extern crate net_traits;
extern crate offscreen_gl_context;
extern crate profile_traits;
@@ -16,6 +16,7 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use layout_traits::LayoutThreadFactory;
use msg::constellation_msg::{FrameId, FrameType, PipelineId, PipelineNamespaceId};
use net::image_cache::ImageCacheImpl;
use net_traits::{IpcSend, ResourceThreads};
use net_traits::image_cache::ImageCache;
use profile_traits::mem as profile_mem;
@@ -34,6 +35,7 @@ use std::env;
use std::ffi::OsStr;
use std::process;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::mpsc::Sender;
use style_traits::CSSPixel;
use webrender_traits;
@@ -472,7 +474,7 @@ impl UnprivilegedPipelineContent {
where LTF: LayoutThreadFactory<Message=Message>,
STF: ScriptThreadFactory<Message=Message>
{
let image_cache = ImageCache::new(self.webrender_api_sender.create_api());
let image_cache = Arc::new(ImageCacheImpl::new(self.webrender_api_sender.create_api()));
let layout_pair = STF::create(InitialScriptState {
id: self.id,
frame_id: self.frame_id,
@@ -48,4 +48,4 @@ pub trait LayoutThreadFactory {
content_process_shutdown_chan: Option<IpcSender<()>>,
webrender_api_sender: webrender_traits::RenderApiSender,
layout_threads: usize);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.