Commit Graph

8 Commits

Author SHA1 Message Date
David Vacca 7d326a98f6 Refactor MapBuffer::getCount
Summary:
EZ refactor of MapBuffer::getCount and removal of TODO

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864307

fbshipit-source-id: 14138090b3f2b45de8e0a3941abec990edb427ed
2021-04-20 12:13:48 -07:00
David Vacca 0b5fbf367d Remove exceptions from MapBuffer class
Summary:
In Fabric we don't throw exception. This diff removes exception from MapBuffer class

changelog: [internal] internal

Reviewed By: JoshuaGross, sammy-SC

Differential Revision: D27303496

fbshipit-source-id: 3f8c3bd2b41121672ef05153459b20cdc2efcda3
2021-03-24 17:20:11 -07:00
David Vacca 0599de5768 change class variable syntax in MapBuffer class
Summary:
This diff changes the syntax of class variables in MapBuffer class to make it consistent with standards

changelog: [internal] internal

Reviewed By: JoshuaGross, sammy-SC

Differential Revision: D27303497

fbshipit-source-id: 7581ce248559726c301ae96312fcb597a061ad5f
2021-03-24 17:20:11 -07:00
David Vacca 91b3f5d48a Implement and integrate Mapbuffer
Summary:
This diff contains the code from the 35 diff stack  - D27210587

This diff implement and integrates Mapbuffer into Fabric text measure system

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D27241836

fbshipit-source-id: f40a780df0723f27da440f709a8676cfcca63953
2021-03-24 03:52:31 -07:00
Igor Klemenski e69f1c9f50 Fix unsafe cast and detect resize overflow. (#31106)
Summary:
Removing unsafe cast from `int` to `uint16_t`.
Also, adding code to detect multiplication overflow during buffer resize.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fix] - Fix unsafe cast and detect overflow in MapBuffer.

Pull Request resolved: https://github.com/facebook/react-native/pull/31106

Test Plan: Code compiles in Visual Studio 2019 without the unsafe cast warning (or error depending on the configuration).

Reviewed By: mdvacca

Differential Revision: D26865138

Pulled By: rozele

fbshipit-source-id: 4692a38b05fc873e31fbbe94d70803244e82de5d
2021-03-09 08:47:31 -08:00
David Vacca 022936bcf5 Initial implementation of MapBuffer
Summary:
This diff defines an initial implementation of MapBuffer class. This is an unfinished implementation and the API and internals is going to change considerably in the next days.

The purpose of this stack is to experiment with ByteBuffers moving data from C++ into Java and learn about what're the performance implications of this model.

The format of serialization is going to change in the next few days. I'm going to follow a format similar to https://fb.quip.com/3ENaA782rkkC

I'm expecting to iterate on this API as we expand the development of the new JNI system, PLEASE read all the TODOs as you are reviewing the code.

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D26364354

fbshipit-source-id: 94e434f699a4250dd240342386eddeaa6acd3ba2
2021-02-17 15:47:07 -08:00
David Vacca 89beefaefb Setup test infra into mapBuffer project
Summary:
Setup test infra into mapBuffer project

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D25733949

fbshipit-source-id: bcfc89d87e28dc5a6ed28bc6b56893aa6f191e71
2021-01-01 15:45:06 -08:00
David Vacca 3093010ea5 move fabric to ReactCommon/react/renderer
Summary:
This diff moves fabric C++ code from ReactCommon/fabric to ReactCommon/react/renderer
As part of this diff I also refactored components, codegen and callsites on CatalystApp, FB4A and venice

Script: P137350694

changelog: [internal] internal refactor

Reviewed By: fkgozali

Differential Revision: D22852139

fbshipit-source-id: f85310ba858b6afd81abfd9cbe6d70b28eca7415
2020-07-31 13:34:29 -07:00