Fix -Wc++11-narrowing for Skia.

Bug: chromium:1216696
Change-Id: I11221c55e2d64c1b47082e36aa44637c411f426f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417116
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Peter Kasting 2021-06-09 08:29:25 -07:00 committed by Skia Commit-Bot
parent eb01ac1b27
commit 95b00157a4
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ typedef void (*GrGpuSubmittedProc)(GrGpuSubmittedContext submittedContext, bool
* backend APIs the same in terms of how the submitted procs are treated.
*/
struct GrFlushInfo {
int fNumSemaphores = 0;
size_t fNumSemaphores = 0;
GrBackendSemaphore* fSignalSemaphores = nullptr;
GrGpuFinishedProc fFinishedProc = nullptr;
GrGpuFinishedContext fFinishedContext = nullptr;

View File

@ -612,7 +612,7 @@ void GrGpu::executeFlushInfo(SkSpan<GrSurfaceProxy*> proxies,
std::unique_ptr<std::unique_ptr<GrSemaphore>[]> semaphores(
new std::unique_ptr<GrSemaphore>[info.fNumSemaphores]);
if (this->caps()->semaphoreSupport() && info.fNumSemaphores) {
for (int i = 0; i < info.fNumSemaphores; ++i) {
for (size_t i = 0; i < info.fNumSemaphores; ++i) {
if (info.fSignalSemaphores[i].isInitialized()) {
semaphores[i] = resourceProvider->wrapBackendSemaphore(
info.fSignalSemaphores[i],