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

Implement GPUSwapChain and GPUCanvasContext and interface with Webrender #26872

Merged
merged 2 commits into from Jun 15, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add WebGPU to Layout-2020

  • Loading branch information
kunalmohan committed Jun 14, 2020
commit 2c95df73a4d74b24db451e5ff1d3ccc5ced10fe2
@@ -451,6 +451,7 @@ where
HTMLCanvasDataSource::Image(ipc_sender) => {
CanvasSource::Image(ipc_sender.map(|renderer| Arc::new(Mutex::new(renderer))))
},
HTMLCanvasDataSource::WebGPU(image_key) => CanvasSource::WebGPU(image_key),
};
Some((
CanvasInfo {
@@ -52,6 +52,7 @@ pub(crate) struct IntrinsicSizes {
pub(crate) enum CanvasSource {
WebGL(ImageKey),
Image(Option<Arc<Mutex<IpcSender<CanvasMsg>>>>),
WebGPU(ImageKey),
}

impl fmt::Debug for CanvasSource {
@@ -62,6 +63,7 @@ impl fmt::Debug for CanvasSource {
match *self {
CanvasSource::WebGL(_) => "WebGL",
CanvasSource::Image(_) => "Image",
CanvasSource::WebGPU(_) => "WebGPU",
}
)
}
@@ -210,6 +212,7 @@ impl ReplacedContent {

let image_key = match canvas_info.source {
CanvasSource::WebGL(image_key) => image_key,
CanvasSource::WebGPU(image_key) => image_key,
CanvasSource::Image(ref ipc_renderer) => match *ipc_renderer {
Some(ref ipc_renderer) => {
let ipc_renderer = ipc_renderer.lock().unwrap();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.