Граф коммитов

233 Коммитов

Автор SHA1 Сообщение Дата
Ryan Hunt 05ee8df788 Bug 1362925 - Update webrender_bindings for cbindgen:0.1.7 r=kats
MozReview-Commit-ID: AwlqUWWEWfz

--HG--
extra : rebase_source : deace018f5d25f3eeecd5d4d683bb4f9a782a05c
extra : amend_source : 051d621e7b35e5389627b0946e7f87f0f8b9fa14
2017-05-08 01:31:20 -04:00
Kartikaya Gupta 989470c342 Bug 1360246 - Update code to use StackingContextHelper::ToRelativeWr* instead of RelativeToParent. r=nical
This updates more code that was using RelativeToParent() to use the
stacking context helper's ToRelativeWr* functions instead. This get us
closer to breaking the assumption that the WR stacking context order maps
1:1 to the layer tree structure.

MozReview-Commit-ID: HQrbvCgPOW4
2017-05-03 08:48:08 -04:00
Jeff Muizelaar 8c32ac0090 Bug 1360001. Add WebRenderPaintedLayerBlob for painting with BlobImages. r=kats
This is a bit of a rough implementation but it works
enough to start.
2017-05-01 21:58:52 -04:00
JerryShih b4ebe36472 Bug 1360435 - Update WR bindings for b9f7e2926731f0ed831108456c219cae30a7e4c8. r=kats
Update for blob image and yuv image interface changes.
The implementation of the blob image renderer is empty now. It will need to be
updated in another commit. This also adds wr_dp_push_yuv_*_image() functions in
WebRenderAPI.

There is no change for |./mach vendor rust|.

MozReview-Commit-ID: Kk2rPAmt3vF
2017-04-28 17:00:57 -04:00
JerryShih ed60edae0c Bug 1351189 - update WR external image callback interface. r=sotaro
The new parameter "channel index" is used to select the specific channel data from a multiple channel textureHost(e.g. yuv format textureHost).

MozReview-Commit-ID: Ey1cA25Z6WH
2017-04-28 14:16:26 +08:00
JerryShih 51510de95b Bug 1359738 - Add push_yuv_image() in WR binding.
Please check [1] for webrender_ffi_generated.h updates.

[1]
https://dxr.mozilla.org/mozilla-central/rev/f229b7e5d91eb70d23d3e31db7caff9d69a2ef04/gfx/webrender_bindings/webrender_ffi_generated.h#7

MozReview-Commit-ID: 3PolFzfQB0l
2017-04-27 15:08:20 +08:00
Kartikaya Gupta 86403106c8 Bug 1358156 - Update webrender to 1437cc124696ecc95b726dffa17f918bb6ea5af1. r=jrmuizel
In addition to updating the Cargo.toml/Cargo.lock files and generated FFI header,
this patch also:
- Updates a couple of field names in the IPC serialization code as a result
  of webrender cset 8ca10a8
- Removes z-index related goop, since it's no longer needed as of webrender
  cset c872232
2017-04-26 10:33:14 -04:00
Kartikaya Gupta 5490a9c0ff Bug 1359462 - Ensure we don't pass a nullptr to slice::from_raw_parts. r=rhunt
Apparently passing a nullptr to slice::from_raw_parts is unsafe. So we
wrap those calls into a helper function that returns an empty slice
instead.

MozReview-Commit-ID: EAp90FKb8cQ
2017-04-25 15:17:01 -04:00
Sotaro Ikeda cbe34ab9f7 Bug 1359295 - Call MakeCurrent() before destroying webrender renderer r=nical 2017-04-25 08:39:33 -07:00
Lee Salzman ea130e2494 Bug 1357952 - update WebRenderAPI to allow index in add_raw_font. r=jrmuizel 2017-04-21 11:50:21 -04:00
Kartikaya Gupta b3a7bb5ca2 Bug 1357392 - Update webrender to f3fa3481aac63ac93c6ccbe805379875e24e5b77. r=jrmuizel,jerry,lsalzman
In addition to regenerating the FFI header and re-vendoring third-party rust
dependencies, this includes the following changes to webrender_bindings code:
- removal of release callback function as a result of changes in 86d4255
- update callback functions for new parameter added in d733af2
- update calls to add_raw_font for API change in 21f2946
2017-04-21 09:58:56 -04:00
Kartikaya Gupta 47ca6562cc Merge m-c to graphics
MozReview-Commit-ID: 3l2zmVoMgdl
2017-04-20 08:47:24 -04:00
sotaro e39bdc681a Bug 1356944 - Fix external image id allocation of WebRenderTextureHost r=nical 2017-04-20 10:24:13 +09:00
sotaro d85c0f08e4 Bug 1357644 - Use wr::ExternalImageId instead of uint64_t for external image id r=nical 2017-04-19 18:59:53 +09:00
Ryan Hunt 6eca7a5745 Bug 1357543 - Add rustfmt.toml and run rustfmt on webrender_bindings r=kats
The new rustfmt.toml is based off servo/rustfmt.toml with some
tweaks to match the existing code in webrender_bindings

MozReview-Commit-ID: 7LbXC6qyjan

--HG--
extra : amend_source : 436e49dbd3d3fd72aab0f1791cf6e0d3fcc348b4
2017-04-18 16:20:53 -04:00
Ryan Hunt 2d446d69ea Bug 1357335 - Use Into<T> for webrender bindings conversions r=kats
Types also implement Copy, Clone now to make this easier.

MozReview-Commit-ID: GEVsCEw2o6K

--HG--
extra : rebase_source : b42ddaab3b7ab0a31006e78aff45ddb6e4160845
extra : amend_source : 82a7e1d272b397c8ab1d0346fd5a708117b897a3
2017-04-18 04:18:35 -04:00
Kartikaya Gupta 76ded9a0bf Bug 1355475 - Update webrender to 07b6c6a1f93b5d8af1dd9ae825906dcf5c310810. r=jrmuizel
This also includes changes to webrender_bindings:
- push_scroll_layer was renamed to push_clip_node in eb4a04b
- Update call to push_text for API change in f040e81.

MozReview-Commit-ID: ILHylvSkco2
2017-04-18 11:18:02 -04:00
Kartikaya Gupta e972cba381 Bug 1357065 - Add a PushClip/PopClip API to WebRenderAPI to more easily distinguish between scrolling clips and non-scrolling clips. r=jrmuizel
Note that in upstream WR the push_scroll_layer API has already been
renamed to push_clip_node, so conceptually the same API covers both
"scrolling clips" (aka scroll layers) and non-scrolling clips. So using
the same underlying API for two different WebRenderAPI.h functions makes
sense.

MozReview-Commit-ID: He7jBVqZuLn
2017-04-18 11:09:39 -04:00
Kartikaya Gupta 8a3a856227 Bug 1357065 - Rename the parameters to PushScrollLayer to be more correct. r=jrmuizel
This changes the parameters to be in line with the clipping documentation.

MozReview-Commit-ID: Fg3iviLTL0g
2017-04-18 11:09:29 -04:00
Kartikaya Gupta fc1d59434f Bug 1357643 - Annotate wr_api_delete so that it can be called in a destructor in non-webrender builds. r=me
MozReview-Commit-ID: 4JrLFCRwxxO
2017-04-19 11:42:27 -04:00
Nicolas Silva fb9bd819a5 Bug 1357643 - Annotate wr_state_delete so that it can be called in a destructor in non-webrender builds. r=kats 2017-04-19 15:20:23 +02:00
peter chang e238a80556 Bug 1345017 - Add animation sampling for WR, r=kats
MozReview-Commit-ID: AR2vajUf2o0
2017-04-12 16:40:48 +08:00
peter chang b9d10e90b5 Bug 1345017 - Update WebRenderAPIs to enable OMTA, r=kats
MozReview-Commit-ID: L8HSxvzoEJZ
2017-03-29 17:23:08 +08:00
Ryan Hunt 444067a435 Bug 1356371 - Use cbindgen for WebRender bindings generation r=kats
This commit adds some directives to help cbindgen generate correct
structs and functions, removes some old FFI code that isn't needed
anymore, and regenerates webrender_ffi_generated.h

MozReview-Commit-ID: KZSEZEN671A

--HG--
extra : rebase_source : 23a07dd11037943156983d9facc039bb7af51c95
2017-04-13 15:45:51 -04:00
Ryan Hunt 422ca37abb Bug 1356371 - Create a WrExternalImageId because ExternalImageId is not repr(C) r=kats
This is only temporary as ExternalImageId has been made repr(C) upstream.

MozReview-Commit-ID: 1On7fRbNI4o

--HG--
extra : rebase_source : 91cb93829de5ccf0a6f0a05ed0d2169268b6c18c
2017-04-13 15:31:09 -04:00
Ryan Hunt d2799c4902 Bug 1356371 - Create a WrRenderedEpochs struct r=kats
This helps cbindgen know to generate a opaque struct for WrRenderedEpochs.

MozReview-Commit-ID: 7moOEBjjbOO

--HG--
extra : rebase_source : 49b3887ae21f659ac353b861f3566cc2817103b0
2017-04-13 15:03:44 -04:00
Ryan Hunt 070551c13f Bug 1352657 - Add a comment about webrender binary recording r=jrmuizel 2017-04-13 14:32:04 -04:00
Ryan Hunt 6aa2c5a2aa Bug 1356057 - Add a WrGlyphInstance struct r=kats
MozReview-Commit-ID: ApIOZyS4VV7

--HG--
extra : rebase_source : cffc119aee9ddf030bc99317667805278295a5ac
extra : histedit_source : 29ce59257222377ffbadf0987ebbe85f1d736a8e
2017-04-12 23:28:40 -04:00
Ryan Hunt 98343720ca Bug 1356057 - Make bindings.rs euclid conversions generic r=kats
MozReview-Commit-ID: 5FLg5UD6IlN

--HG--
extra : rebase_source : d071ed1aaf7bc3a1c40c90c454296b3799e6ad88
extra : histedit_source : ae48b57065eef16dad172cc33fbf2c43026f2dfc
2017-04-12 23:41:02 -04:00
sotaro 79b1971bae Bug 1356088 - Fix ImageKey removals of ExternalImages r=jrmuizel 2017-04-13 20:53:21 +09:00
Ryan Hunt bfa4ee5cb2 Bug 1355570 - Update bindings and WebRender display list building for gradient tiling r=jrmuizel
MozReview-Commit-ID: KwhCBc8XxCN

--HG--
extra : rebase_source : a5608b3388528ae1bd39be5f2fd9b2094193d46c
extra : source : c244293944bc163a742ef1b6f4225a751db5f796
extra : histedit_source : 860c2dc0fd3f8a5f35aea9b1ca15218d64208b65%2C803c9c5d3e85ee73fda2e3ccf504426b4798aecb
2017-04-12 14:20:52 -05:00
Kartikaya Gupta 4ae17c3c9c Bug 1354944 - Plug in the generated FFI header. r=jrmuizel
MozReview-Commit-ID: E6qlCffKH1s
2017-04-11 22:17:18 -04:00
Kartikaya Gupta 851b246da0 Bug 1354950 - Add a destructor_safe doc attribute as a hint to the binding generator. r=rhunt
MozReview-Commit-ID: 3N1JsRsB01g
2017-04-11 22:17:10 -04:00
Kartikaya Gupta 8318f4c805 Bug 1355590 - Fix WrClipRegion/WrRect mismatch in a couple of Rust FFI functions. r=mtseng
MozReview-Commit-ID: 4gUyk4cRTAo
2017-04-11 22:17:02 -04:00
Kartikaya Gupta 23053869fc Bug 1355615 - Update wr_api_finalize_builder to take pointers on the C++ side to match the Rust side. r=jrmuizel
MozReview-Commit-ID: IskZgT17n42
2017-04-11 18:03:59 -04:00
Kartikaya Gupta ee6ed70bc5 Bug 1355614 - Update wr_dp_push_text to take an immutable pointer to match the C++ side. r=jrmuizel
MozReview-Commit-ID: GjHo8RBt3wX
2017-04-11 18:01:04 -04:00
Kartikaya Gupta db665d693b Bug 1355612 - Make WrGlyphInstance hold a Point2D instead of raw x/y to match the Rust side. r=jrmuizel
MozReview-Commit-ID: 7OtctQ4gWyv
2017-04-11 18:00:50 -04:00
Kartikaya Gupta 8050498fed Bug 1355602 - Decouple pushing scroll layers from pushing stacking contexts. r=jrmuizel
This removes the call to push_scroll_layer in wr_push_stacking_context, so that
it's now possible to push a stacking context without necessarily pushing a
scroll layer. There is already a separate function to push a scroll layer so the
call sites can do that. This patch just changes all the call sites that were
pushing a stacking context to also push a scroll layer, so there should be no
functional change. Future patches can remove the spurious scroll layers.

MozReview-Commit-ID: FtCkc9JQd8l
2017-04-11 17:04:59 -04:00
Kartikaya Gupta 728e0fbb28 Bug 1355578 - Update push_scroll_layer's signature on the Rust side to match that on the C++ side. r=jrmuizel
MozReview-Commit-ID: 9ouWihnNkbR
2017-04-11 16:13:58 -04:00
Kartikaya Gupta 1880bd37a5 Bug 1355577 - Make the pointer in WrByteSlice const on the C++ side to match the Rust side. r=jrmuizel
MozReview-Commit-ID: FWCzZt8RAMj
2017-04-11 16:13:44 -04:00
Kartikaya Gupta 59dd9e78bc Bug 1353484 - Update webrender to 3dd68f54e12bd5abf8ef41de4d4ec851620f7e4e. r=jrmuizel,kvark,rhunt
This includes:
- updating calls to push_scroll_layer for API change in 7253e2f.
- updating calls to push_stacking_context for API change in be249f6.
- updating for changes to gradient APIs in 05c4293.
2017-04-11 10:00:41 -04:00
Kartikaya Gupta de71f88ab4 Bug 1354946 - Add an explicit WrMatrix type for passing 4x4 matrices across the FFI boundary. r=rhunt
Right now we just cast from a float* on the C++ side to a LayoutTransform on
the Rust side, except the LayoutTransform isn't a repr(C) storage type, so
there's no guarantee that it will actually have the same layout. Adding an
explicit type and conversion code ensure that we are able to pass the matrix
across the boundary safely.

MozReview-Commit-ID: H3gK3g0K3xz
2017-04-11 08:33:58 -04:00
Kartikaya Gupta 6f05b1f766 Bug 1355187 - Update some of the ExternalImage data types to be more similar in Rust and C++. r=rhunt
The WrExternalImageId is currently a struct wrapping a uint64_t on the C++ side,
which is unnecessary as we can just typedef it directly to a uint64_t. On the
Rust side it's a tuple of (u64).

Also the WrExternalImageIdType enum should be WrExternalImageType for consistency.

MozReview-Commit-ID: DgOf4xfY9h3
2017-04-10 17:38:02 -04:00
Kartikaya Gupta 1358415529 Bug 1355187 - Rename some struct fields so that the Rust/C++ names are the same. r=rhunt
The binding generator just takes the Rust field names and uses that in the
generated C++ structs. So installing the autogenerated bindings is easier if
we make sure the names are the same ahead of time.

MozReview-Commit-ID: 6cuzmtI5Qqw
2017-04-10 17:38:02 -04:00
Kartikaya Gupta 2e1233a137 Bug 1355187 - Add type aliases for instantiations of WrSideOffsets. r=rhunt
The binding generator needs this in order to deal with the generic-ness of the
WrSideOffsets type.

MozReview-Commit-ID: GetmNIpqf7O
2017-04-10 17:38:01 -04:00
Kartikaya Gupta 61b80a8602 Bug 1355187 - Update Rust FFI function signatures to use types with Wr prefix. r=rhunt
This patch:
- adds a type alias for ExternalImageId and updates uses.
- renames WrExternalImageStruct to drop the "Struct" suffix which is redundant
  and not present in the corresponding C++ struct.
- updates the delete-font function to use aliases I added previously.

MozReview-Commit-ID: ILsFihkMlIw
2017-04-10 17:38:01 -04:00
Kartikaya Gupta 48eb1475b5 Bug 1355183 - Mark WrExternalImageType as repr(u32) instead of repr(C). r=rhunt
On the C++ side the enum extends from uint32_t, like all the other enums across
the WR FFI boundary. So the Rust side they should be repr(u32).

MozReview-Commit-ID: JOf44I154ea
2017-04-10 17:38:01 -04:00
Kartikaya Gupta 8c1aeb1cb3 Bug 1354951 - Add some typedefs in bindings.rs to make the rust function signatures better match the signatures in webrender_ffi.h. r=rhunt
MozReview-Commit-ID: 8JZDNMwLDpN
2017-04-10 10:28:45 -04:00
Kartikaya Gupta 18bf4caba2 Merge m-c to graphics
MozReview-Commit-ID: ICVAgHmKVL4
2017-04-10 08:47:20 -04:00
Morris Tseng d4a7aaf673 Bug 1347469 - Add bindings for gradient border. r=kats
MozReview-Commit-ID: H6OwWaeBYWY
2017-04-10 17:27:30 +08:00