On 3/21/18 4:43 PM, Praneet Mocherla wrote:
Hi all,
Brody and I are working on the canvas rendering project:
https://github.com/servo/servo/wiki/Canvas-rendering-project
We've been working on this for a couple of days, and it's our first time
contributing to an open source project. We are currently stuck at this initial
step:
"make the response_sender argument of handle_create_canvas_paint_thread also include
the new CanvasId value, and pass it as an argument to CanvasPaintThread::start. Store the
id when it is received for use in all canvas messages"
We're confused on how to associate the response sender with the CanvasId. Any
help would be appreciated!
Thanks,
Praneet and Brody
Welcome! A sender has a type T associated with it, so it looks like
Sender<T> (or IpcSender<T>). This means you'll see something like
Sender<Whatever>; but T can also be a tuple like (SomeType,
AnotherType). I would recommend turning it into a Sender<(CanvasId,
Whatever)> so that all users will have to send a CanvasId value along
with the existing value.
Cheers,
Josh
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo