Commit Graph

4 Commits

Author SHA1 Message Date
Valentin Shergin f96f9c5fd6 Sideeffectless measuring of shadow views
Summary:
That's now possible thanks to new Yoga's clonning API.
That will speed up RCTSurface measuring (see the next diff in stack) and should illuminate a class of problems in CK interop layer.
We also will use it in the new text layout engine (in React Native).

Reviewed By: gkassabli

Differential Revision: D6665632

fbshipit-source-id: e94909f0af89e9c7fc5e46b95090ecb3c52546a2
2018-01-07 18:31:20 -08:00
Valentin Shergin d9e5b313bb Helpers for proper conversion float values between CG and YG representations
Summary:
Yoga and CoreGraphics have different opinions about how "infinity" value
should be represented.
Yoga uses `NAN` which requires additional effort to compare all those values,
whereas GoreGraphics uses `GFLOAT_MAX` which can be easyly compared with
standard `==` operator.

Messing with this can cause super weired bugs like 100% CPU load for couple of seconds somewhere in CoreGraphics.

Reviewed By: mmmulani

Differential Revision: D6665633

fbshipit-source-id: b6236c6fa50d1f8fb0c9576203922f7b24b7301e
2018-01-07 18:31:20 -08:00
Valentin Shergin af226ef949 Designated methods to control dirty propagation
Summary:
Those are supposed to replace all `dirtyText`, `dirtyPropagation`, `isPropagationDirty`, `setTextComputed`, `isTextDirty` and so on.
We will use it widely soon (and remove all old ones).

Reviewed By: mmmulani

Differential Revision: D6665634

fbshipit-source-id: 3c1db7154e90b71446756f2495627b163c779996
2018-01-07 18:31:20 -08:00
Valentin Shergin 5058e7eb05 Several layout related helper methods of RCTShadowView was moved to new (+Layout) category.
Reviewed By: javache

Differential Revision: D4865327

fbshipit-source-id: 4df71b57433370ee09c3f1288c4d6241a33f440a
2017-05-08 11:31:20 -07:00