Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable several WebRender instances to share a thread pool. #855
Conversation
|
Thanks! |
|
|
Enable several WebRender instances to share a thread pool. This is a simplified version of PR #852 which only enables sharing the thread pool. It would be worth looking into why ThreadPool isn't Sync and see if we can avoid the mutex. r? @kvark <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/855) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
|
Enable several WebRender instances to share a thread pool. This is a simplified version of PR #852 which only enables sharing the thread pool. It would be worth looking into why ThreadPool isn't Sync and see if we can avoid the mutex. r? @kvark <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/855) <!-- Reviewable:end -->
|
|
|
@bors-servo retry
|
|
|
|
|
|
Ok, let's try again. It's Friday, what can possibly go wrong? |
|
|
Enable several WebRender instances to share a thread pool. This is a simplified version of PR #852 which only enables sharing the thread pool. It would be worth looking into why ThreadPool isn't Sync and see if we can avoid the mutex. r? @kvark <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/855) <!-- Reviewable:end -->
|
|
|
Uh, that's new:
@bors-servo retry |
Enable several WebRender instances to share a thread pool. This is a simplified version of PR #852 which only enables sharing the thread pool. It would be worth looking into why ThreadPool isn't Sync and see if we can avoid the mutex. r? @kvark <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/855) <!-- Reviewable:end -->
|
I wish bors didn't have to rebuid the platforms that already succeeded for the same changelist. |
|
|
Blob image renderer Here is a simple integration of a VectorImageRenderer abstraction that can be implemented to render vector graphics to an image. The main ideas are that: - The interface should be implementable outside of WebRender in order for gecko to put in there things that WebRender cannot handle yet. - The result should be transparently usable as a regular image. - The intent is for the renderer to use the same thread pool as the glyph cache (an implementation detail of the vector renderer thanks to PR #855) - The interface should be extended to support some sort of sparse/tiled output for very large scrollable vector images. The wr_sample implements a dummy vector renderer that always outputs a checkerboard pattern. You can have a look and see how it works. Implementation-wise, vector images are treated like raw images, except that when an image is requested, if it is a vector image the resource cache asks the renderer to paint it asynchronously, and waits for the result at the end of the frame, just before inserting it into the texture cache. I am pretty happy with how simple it turns out (but I guess it will become a lot trickier with zoom support), it took me a few attempts, the first few implementations were a lot more complicated. The VectorImageRenderer interface needs a bit of work. The request expects a certain size, which will probably not play well with the scaling factor that we should apply when zooming. It also passes an ImageDescriptor but it's not obvious to me whether we want to support anything other than RGBA8 (and maybe A8 for masks) and the stride member is also awkward. I'm not sure what's best between VectorImageData being a ```Vec<u8>``` or a pointer-sized opaque handle like ExternalEvent (in which case we'd need to figure out who gets to delete the thing). Feedback very welcome @kvark @glennw @jrmuizel @JerryShih <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/858) <!-- Reviewable:end -->
nical commentedFeb 9, 2017
•
edited by larsbergstrom
This is a simplified version of PR #852 which only enables sharing the thread pool.
It would be worth looking into why ThreadPool isn't Sync and see if we can avoid the mutex.
r? @kvark
This change is