Canvas to handle null layer device.
http://codereview.appspot.com/4907045/ See also http://code.google.com/p/chromium/issues/detail?id=93000. git-svn-id: http://skia.googlecode.com/svn/trunk@2130 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
583a1e3850
commit
e25c68402b
@ -711,6 +711,10 @@ int SkCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
|
|||||||
|
|
||||||
SkDevice* device = this->createLayerDevice(config, ir.width(), ir.height(),
|
SkDevice* device = this->createLayerDevice(config, ir.width(), ir.height(),
|
||||||
isOpaque);
|
isOpaque);
|
||||||
|
if (NULL == device) {
|
||||||
|
SkDebugf("Unable to create device for layer.");
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
device->setOrigin(ir.fLeft, ir.fTop);
|
device->setOrigin(ir.fLeft, ir.fTop);
|
||||||
DeviceCM* layer = SkNEW_ARGS(DeviceCM, (device, ir.fLeft, ir.fTop, paint));
|
DeviceCM* layer = SkNEW_ARGS(DeviceCM, (device, ir.fLeft, ir.fTop, paint));
|
||||||
|
@ -189,8 +189,8 @@ HRESULT STDMETHODCALLTYPE SkIStream::Seek(LARGE_INTEGER liDistanceToMove
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL != lpNewFilePointer) {
|
if (NULL != lpNewFilePointer) {
|
||||||
lpNewFilePointer->QuadPart = this->fLocation.QuadPart;
|
lpNewFilePointer->QuadPart = this->fLocation.QuadPart;
|
||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user