Upstream has migrated several places from
`viz::CopyOutputBitmapWithMetadata` to this new callback. This has also
affected the rewards code, where `Bitmap` was being passed as a const
ref, but now ends up being passed by value.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/2fad3cf2b5d23a859c16cbc5a7b7273614fbd766
commit 2fad3cf2b5d23a859c16cbc5a7b7273614fbd766
Author: Tianyang Xu <xtlsheep@google.com>
Date: Fri Dec 19 09:30:13 2025 -0800
Add better error support for CopyFromSurface method
To better support error handling in CopyFromSurface, changed expecting
type of callback from
`const viz::CopyOutputBitmapWithMetadata&`
to
`const base::expected<viz::CopyOutputBitmapWithMetadata, std::string>&`
This CL is very similar to `Add wrapper struct for CopyFromSurface
output` https://crrev.com/c/7003989
Bug: 447589565
Change-Id: I684ab9ae721b681ede7acf87387b18120a2331ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7229082
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: thefrog <thefrog@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Nihar Majmudar <niharm@google.com>
Commit-Queue: Tianyang Xu <xtlsheep@google.com>
Cr-Commit-Position: refs/heads/main@{#1561205}