Commit graph

3667 commits

Author SHA1 Message Date
Mike Blumenkrantz
af1dce5a2e add new browser process interface method for main loop integration
regular CEF requires the user to either run the cef main loop or
poll on a function to drain events. now the engine will trigger a callback
in some application thread which will notify it that there is work
to be done by the browser
2015-05-27 14:45:39 -04:00
Mike Blumenkrantz
83e605d2fb add no_mangle to servo_test() embedding function 2015-05-27 14:45:38 -04:00
Mike Blumenkrantz
d7ad5d6ea2 add cef method for notifying the main loop of work available 2015-05-27 14:45:37 -04:00
Matt Brubeck
0fd9953802 Update azure and its dependencies
Part of #6088
2015-05-27 11:22:45 -07:00
Simon Sapin
56af011355 Use harfbuzz bindings from crates.io
https://github.com/servo/rust-harfbuzz/issues/39
https://www.mail-archive.com/dev-servo@lists.mozilla.org/msg01289.html
2015-05-26 14:47:34 +02:00
bors-servo
4a95bce9f2 Auto merge of #6125 - zmike:renderrenderrenderrender, r=larsbergstrom
A collection of commits which improves embedding integration and rendering.

@larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6125)
<!-- Reviewable:end -->
2015-05-24 19:26:00 -05:00
Mike Blumenkrantz
c884b43b71 another glutin update 2015-05-24 19:53:44 -04:00
Corey Farwell
8e3f4bba85 Reduce max line length from 150 to 120 characters
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Mike Blumenkrantz
8799213d4a fix build 2015-05-23 09:03:42 -04:00
Mike Blumenkrantz
fcb5cf9c6d update offscreen_gl_context 2015-05-23 08:39:37 -04:00
Mike Blumenkrantz
c6a4bdb787 x11 version bump 2015-05-22 21:11:08 -04:00
Lars Bergstrom
442bfb716b Update various Cargo patches and deal with the fallout 2015-05-22 16:16:50 -05:00
Simon Sapin
53c32cdc78 Remove usage of the mod_path compiler plugin.
https://github.com/rust-lang/rust/pull/20179 makes its use case much weaker.
2015-05-22 10:08:38 +02:00
Mike Blumenkrantz
25f87aa8ab fix compile after pcwalton's multi-event handling PR 2015-05-21 21:16:24 -04:00
Mike Blumenkrantz
f53fc1900d update pkg-config for cargo 2015-05-21 21:16:23 -04:00
Mike Blumenkrantz
9b8585f20d update cargo layers rust thing checkout 2015-05-21 21:15:23 -04:00
Mike Blumenkrantz
82cf1d53e3 bump rust-layers version 2015-05-21 21:15:22 -04:00
Mike Blumenkrantz
5697d9ff2c add back browser_host::composite() method for embedding
this changes the way that applications will use servo. whereas previously
it was only necessary to call initialize() -> makecurrent, it's now necessary
to explicitly call the composite() method in order to trigger the gl rendering.

any other composite attempts (by servo) will trigger the on_paint() method,
informing the app that a frame is ready. it's then up to the app to schedule
the composite() such that the frame is rendered in a timely manner
2015-05-21 21:15:21 -04:00
Mike Blumenkrantz
12d792f427 only create our own Display* in embedding when using OSR 2015-05-21 21:15:20 -04:00
Mike Blumenkrantz
789a4973f7 check method existence for hidpi_factor(), handle platforms other than macos 2015-05-21 21:15:19 -04:00
Mike Blumenkrantz
1aed319684 add pointer checks for cef method calls to avoid crashing on nonexistent methods 2015-05-21 21:15:18 -04:00
Mike Blumenkrantz
ca7fc036fe ensure window protocol handling occurs during cef browser loop updating
fixes window events when using cef windowed rendering
2015-05-21 21:15:18 -04:00
Mike Blumenkrantz
1cd850b121 add window member to servo cef browser object to fix framebuffer size method
platforms other than macos will not need/use a get_backing_rect() method since
there is no virtual pixel scaling, and this method will need to be usable
even before browsers are finished setting up, so ensure we can at least pass
initial window size back

also check method pointer availability before calling into a null function
2015-05-21 21:15:17 -04:00
Mike Blumenkrantz
e5a274b467 call XInitThreads() before creating our cef Display* object 2015-05-21 21:15:16 -04:00
Mike Blumenkrantz
09aba1f9de remove misleading FIXME(pcwalton) regarding gtk event loops in cef window 2015-05-21 21:15:15 -04:00
Mike Blumenkrantz
fb72a64833 pass width and height information through to cef paint callback 2015-05-21 21:15:15 -04:00
Mike Blumenkrantz
8330eabac1 temp re-set default url for cef while I figure out wtf is going on 2015-05-21 21:15:13 -04:00
Mike Blumenkrantz
42179cf6e7 create x11 Display connection on cef_initialize() as expected
this is how cef does it, we must obey our chromium overlords
2015-05-21 21:15:12 -04:00
Mike Blumenkrantz
bf1d12e5e9 add note that cef_render_handler_t::get_backing_rect() is only for os 2015-05-21 21:15:11 -04:00
Mike Blumenkrantz
52fb8562d6 add embedding macro for checking pointer existence
needed for determining whether an interface or callback has been provided
2015-05-21 21:15:11 -04:00
Mike Blumenkrantz
a296b2d073 add back cef_browser_host::composite() method 2015-05-21 21:15:10 -04:00
Manish Goregaokar
4bc9445b9e Upgrade rust to 716f920b7e234b450f272346fea961832505c06e (Tue May 19 05:39:29 2015 +0000) 2015-05-20 15:39:02 -07:00
bors-servo
ad53e95080 Auto merge of #6083 - ecoal95:layerize-canvas, r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6083)
<!-- Reviewable:end -->
2015-05-20 15:42:06 -05:00
Patrick Walton
0098d9e9e8 compositing: Support multiple events per frame.
Improves scrolling performance on Mac.
2015-05-20 10:53:48 -07:00
ecoal95
3350522306 Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.

Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
bors-servo
d68730a0fc Auto merge of #6074 - pgonda:lint-fix-struct-enum-variants, r=Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6074)
<!-- Reviewable:end -->
2015-05-20 10:29:48 -05:00
Peter
717b443eec fixes #6069 2015-05-20 10:58:30 -04:00
Patrick Walton
6a197719b3 compositing: Implement display ports and avoid creating display lists
for items outside it.

This improves Servo's performance on large pages.
2015-05-19 16:53:51 -07:00
Mike Blumenkrantz
5ce23cd36c update glutin repo ref 2015-05-18 12:26:46 -04:00
Glenn Watson
711c889d89 Fix android - it now renders the default wikipedia page correctly. 2015-05-18 10:18:56 +10:00
Glenn Watson
676c59cc18 Fix a few warnings in cef build 2015-05-15 13:48:03 +10:00
bors-servo
a97f81b83d Auto merge of #6016 - zmike:embedding-windowing, r=larsbergstrom
Depends on glutin PR #21

@glennw  @larsbergstrom

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6016)
<!-- Reviewable:end -->
2015-05-14 20:06:04 -05:00
Mike Blumenkrantz
6f6945aafc try fixing macos embedding build 2015-05-14 21:00:42 -04:00
Patrick Walton
a0980091cf gfx: Implement paint flashing, which will be useful for debugging
invalidation.
2015-05-14 15:45:41 -07:00
Ms2ger
d84c3e7a30 Fix some overlong lines. 2015-05-14 13:26:13 +02:00
bors-servo
5e61ebaa05 Auto merge of #6031 - glennw:reftest-race-conditions, r=larsberg,jdm
The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6031)
<!-- Reviewable:end -->
2015-05-13 18:37:54 -05:00
Glenn Watson
eec3fad93d Fixes a number of race conditions and reliability issues with reftests and compositor.
The basic idea is it's safe to output an image for reftest by testing:
 - That the compositor doesn't have any animations active.
 - That the compositor is not waiting on any outstanding paint messages to arrive.
 - That the script tasks are "idle" and therefore won't cause reflow.
    - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered.
    - It could easily be expanded to handle pending timers etc.
 - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
2015-05-14 09:35:53 +10:00
Mike Blumenkrantz
6c32998100 update rust-layers version 2015-05-13 17:13:36 -04:00
bors-servo
a388a76d82 Auto merge of #5995 - zmike:glutin-parenting, r=jdm
needed for embedding api usage

Depends on https://github.com/servo/glutin/pull/20

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5995)
<!-- Reviewable:end -->
2015-05-13 15:27:47 -05:00
Mike Blumenkrantz
d2133b2467 bump glutin version for cargo 2015-05-13 13:25:00 -04:00