Closed Bug 1389027 Opened 7 years ago Closed 7 years ago

Support nsDisplayPerspective in layers-free mode

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: mtseng, Assigned: mtseng)

References

Details

Attachments

(1 file)

I have a patch. But rendering result is wrong when the item has offset. I'm still debugging it.
Does it work properly in Servo? There could still be bugs on the WebRender side.
Sure, I'll check how Servo display perspective displayitem.
Looks like basic perspective support is ok. I use this website (https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_perspective1) for testing. The result is correct. I'll continue implement in layers-free mode.
(In reply to Morris Tseng [:mtseng] [:Morris] from comment #3)
> Looks like basic perspective support is ok.
I mean the basic support "in servo" is ok
Assignee: nobody → mtseng
Comment on attachment 8896127 [details]
Bug 1389027 - Support nsDisplayPerspective in layers-free mode.

https://reviewboard.mozilla.org/r/167412/#review172722

::: layout/painting/nsDisplayList.cpp:8467
(Diff revision 1)
> +  Point3D newOrigin =
> +    Point3D(NSAppUnitsToFloatPixels(transform->ToReferenceFrame().x, appUnitsPerPixel),
> +            NSAppUnitsToFloatPixels(transform->ToReferenceFrame().y, appUnitsPerPixel),
> +            0.0f);
> +  Point3D roundedOrigin(NS_round(newOrigin.x),
> +                        NS_round(newOrigin.y),
> +                        0);
> +

Honestly I have no idea about the correctness of this code. It seems reasonable enough. The rest of the patch looks fine, so if this is producing correct behaviour it's fine by me. Hopefully once we have reftests going we can iron out any problems in this code.
Attachment #8896127 - Flags: review?(bugmail) → review+
Pushed by mtseng@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3cb6874a7489
Support nsDisplayPerspective in layers-free mode. r=kats
https://hg.mozilla.org/mozilla-central/rev/3cb6874a7489
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: