I think this is a minimum set to cover ownership here; PTAL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::ByteSizeDelta(4 * size_.width() * size_.height());nit: Consistency: Use 'base::ByteSize' instead of 'base::ByteSizeDelta' to represent the size of the depth/stencil buffer. This maintains consistency with other buffer size calculations in this method (e.g., line 1233) and semantically represents a size rather than a difference.
To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason
_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::ByteSizeDelta(4 * size_.width() * size_.height());Switch to `base::ByteSize(base::checked_cast<uint64_t>(4 * size_.width() * size_.height()))`.
Reason: This represents an absolute quantity of bytes, not a delta. It just happens to be computed from signed numbers that we expect to be non-negative. If we wanted this to be less verbose, we could introduce `base::ByteSize::FromNonNegativeSigned`, which would CHECK that its signed argument isn't negative.
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
base::ByteSizeDelta(4 * size_.width() * size_.height());nit: Consistency: Use 'base::ByteSize' instead of 'base::ByteSizeDelta' to represent the size of the depth/stencil buffer. This maintains consistency with other buffer size calculations in this method (e.g., line 1233) and semantically represents a size rather than a difference.
To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason
_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
Done
base::ByteSizeDelta(4 * size_.width() * size_.height());Switch to `base::ByteSize(base::checked_cast<uint64_t>(4 * size_.width() * size_.height()))`.
Reason: This represents an absolute quantity of bytes, not a delta. It just happens to be computed from signed numbers that we expect to be non-negative. If we wanted this to be less verbose, we could introduce `base::ByteSize::FromNonNegativeSigned`, which would CHECK that its signed argument isn't negative.
Done. We probably should change rect to have unsigned size.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
#include "base/byte_size.h"IWYU nit: We're still using `ByteCount` below, so we should still include the `byte_count.h` header. I'm not actually sure `base/byte_size.h` is necessary in this file?
base::ByteCount memory_used(entry.key->GetMemoryUsage().InBytes());I'm not sure I understand this change. Why convert the `base::ByteCount` to an `int64_t` and then use that to construct a `base::ByteCount`?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
IWYU nit: We're still using `ByteCount` below, so we should still include the `byte_count.h` header. I'm not actually sure `base/byte_size.h` is necessary in this file?
Marked as resolved.
base::ByteCount memory_used(entry.key->GetMemoryUsage().InBytes());I'm not sure I understand this change. Why convert the `base::ByteCount` to an `int64_t` and then use that to construct a `base::ByteCount`?
We’re switching from the new type to the old type. I missed that there’s a conversion function; using that instead.
| 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. |
I think kbr is redundant as an owner so removing.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM % nit. Thanks!
#include "base/byte_size.h"Avi DrissmanIWYU nit: We're still using `ByteCount` below, so we should still include the `byte_count.h` header. I'm not actually sure `base/byte_size.h` is necessary in this file?
Marked as resolved.
Unfortunately, you're now using `base::ByteSize` below, so I think we need the new header... :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
#include "base/byte_size.h"Avi DrissmanIWYU nit: We're still using `ByteCount` below, so we should still include the `byte_count.h` header. I'm not actually sure `base/byte_size.h` is necessary in this file?
Mike WestMarked as resolved.
Unfortunately, you're now using `base::ByteSize` below, so I think we need the new header... :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/renderer/controller/performance_manager/v8_detailed_memory_reporter_impl.cc
Insertions: 1, Deletions: 1.
@@ -9,7 +9,7 @@
#include <utility>
#include <vector>
-#include "base/byte_count.h"
+#include "base/byte_size.h"
#include "base/check.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
```
Move Blink images to use ByteSize rather than ByteCount
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |