Cherry Pick to M68
No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: chromium:860399
Change-Id: I6793e7fe7e97b7848d40170046dcff4c2fcc48c7
Reviewed-On: https://skia-review.googlesource.com/141101
Reviewed-By: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/142169
if (!SkImageInfoValidConversion(finalII, tempII)) {
return false;
}
- tempPixmap.alloc(tempII);
+ if (!tempPixmap.tryAlloc(tempII)) {
+ return false;
+ }
finalPixmap.reset(finalII, buffer, rowBytes);
buffer = tempPixmap.writable_addr();
rowBytes = tempPixmap.rowBytes();