Closed Bug 1355614 Opened 8 years ago Closed 8 years ago

wr_dp_push_text const mismatch

Categories

(Core :: Graphics: WebRender, enhancement, P3)

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

The Rust side takes a `glyphs: *mut WrGlyphInstance` while the C++ side takes a `const WrGlyphInstance* glyphs`. This is bad because C++ might pass in a const thing and then the Rust side goes ahead and mutates it, or something. More to the point, it doesn't play nice with the binding generator because the C++ signature comes out as non-const, and then callers to that FFI function the C++ side don't compile because they try to pass a const thing in. We can fix this on the Rust side by changing it to an immutable pointer as well.
Comment on attachment 8857202 [details] Bug 1355614 - Update wr_dp_push_text to take an immutable pointer to match the C++ side. https://reviewboard.mozilla.org/r/129134/#review131638
Attachment #8857202 - Flags: review?(jmuizelaar) → review+
Pushed by kgupta@mozilla.com: https://hg.mozilla.org/projects/graphics/rev/65c887a8f332 Update wr_dp_push_text to take an immutable pointer to match the C++ side. r=jrmuizel
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: