init fDeviceClipBounds for empty canvas

Otherwise, it is uninitialized when there is no init device.

Change-Id: I3594f6fb4cf6380b5ba74ff5e4955fab8f449146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291236
Reviewed-by: Jim Graham <jimgraham@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2020-05-20 20:57:55 -04:00 committed by Skia Commit-Bot
parent 67ff541ac1
commit 4c05786322

View File

@ -511,6 +511,7 @@ void SkCanvas::init(sk_sp<SkBaseDevice> device) {
fMCRec->fTopLayer = fMCRec->fLayer;
fSurfaceBase = nullptr;
fDeviceClipBounds = {0, 0, 0, 0};
if (device) {
// The root device and the canvas should always have the same pixel geometry