| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
size_t size = 0;Add a comment here explaining size is the size requested for `data`, I.E. the reason it says is PlaneInfo is constructed with only `offset` and `size` set and then later `data` is allocated with that information.
Basically I was confused if we could remove this (answer is no), because of the above. Feel free to reword but this should have a clarification comment.
base::raw_span<uint8_t> data;Also this seems strange to be a raw_span/raw_ptr... It is owned by PlaneInfo, deleted in its constructor.
What do you think about
```
base::HeapArray<uint8_t> data;
```
And using [FromOwningPointer](https://source.chromium.org/chromium/chromium/src/+/main:base/containers/heap_array.h;l=102;drc=a1d268ec0bc5f1b763bd8dfd373264a4d57ef00b) with a custom deleting_type that calls `munmap`?
Then the ownership is clearer, we don't need raw_span (avoiding the overhead of raw_ptr), and we still get bounds checking and .AsSpan() functions for safe access.
// `size_to_map` bytes. // Set nullptr to info.data in order not to call munmap in |info| dtor.outdated comment
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! Please add me back once Stephen has LGTM'd.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Add a comment here explaining size is the size requested for `data`, I.E. the reason it says is PlaneInfo is constructed with only `offset` and `size` set and then later `data` is allocated with that information.
Basically I was confused if we could remove this (answer is no), because of the above. Feel free to reword but this should have a clarification comment.
Done
Also this seems strange to be a raw_span/raw_ptr... It is owned by PlaneInfo, deleted in its constructor.
What do you think about
```
base::HeapArray<uint8_t> data;
```And using [FromOwningPointer](https://source.chromium.org/chromium/chromium/src/+/main:base/containers/heap_array.h;l=102;drc=a1d268ec0bc5f1b763bd8dfd373264a4d57ef00b) with a custom deleting_type that calls `munmap`?
Then the ownership is clearer, we don't need raw_span (avoiding the overhead of raw_ptr), and we still get bounds checking and .AsSpan() functions for safe access.
Marked as resolved.
// `size_to_map` bytes. // Set nullptr to info.data in order not to call munmap in |info| dtor.Roberto Torresoutdated comment
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
plane_info_[plane].data.subspan(plane_info_[plane].offset).data());can this subspan become an index acces + & operator?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
plane_info_[plane].data.subspan(plane_info_[plane].offset).data());can this subspan become an index acces + & operator?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I'll review after Stephen LGTM's, thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
Thanks! LGTM for OWNERS, defer to Stephen on the technical review.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
spanification: automatically spanify ui/gfx/linux/client_native_pixmap_dmabuf.cc etc.
This is the result of running the automatic spanification on linux and
updating code to use and pass spans where size is known.
The original patch was fully automated using script:
//tools/clang/spanify/rewrite-multiple-platforms.sh -platforms=linux
Then refined with gemini-cli
gemini-run/batch-run-1761798078/group_87
BUG=439964610
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |