| commit | 0b2f74c6fe0ec1bcdd0348e98f670af9c547048c | [log] [tgz] |
|---|---|---|
| author | Lei Zhang <thestig@chromium.org> | Fri Feb 21 19:57:31 2025 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 21 19:57:31 2025 |
| tree | fcd6ef28853909eb0348c9330b4a89be2e5f375e | |
| parent | da911aec7aaf08c31389454a28811be9630f95b3 [diff] |
[PDF] Add Thumbnail::CalculateImageSize() to avoid unneeded memory alloc Currently, several places instantiate the Thumbnail class, which allocates memory for the thumbnail image data, only to never use the allocated memory. This is because the Thumbnail instances are being used solely to get the image size. Add a dedicated CalculateImageSize() method for doing just that, so callers that only care about the image size can get it without instantiating a Thumbnail. Change-Id: I3f49c4e5902f3832448fb973e481e34e27ce03b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6290593 Reviewed-by: Alan Screen <awscreen@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/main@{#1423294}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.