Extend origin-clean algorithm (DiD).

This commit is contained in:
wolfbeast 2019-03-22 13:11:18 +01:00 committed by Roy Tam
commit ac1a607eb0
2 changed files with 8 additions and 3 deletions

View file

@ -6329,6 +6329,13 @@ CanvasRenderingContext2D::ShouldForceInactiveLayer(LayerManager* aManager)
return !aManager->CanUseCanvasLayerForSize(GetSize());
}
void CanvasRenderingContext2D::SetWriteOnly() {
mWriteOnly = true;
if (mCanvasElement) {
mCanvasElement->SetWriteOnly();
}
}
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CanvasPath, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CanvasPath, Release)

View file

@ -1156,9 +1156,7 @@ protected:
// For the origin-clean algorithm (mWriteOnly == !origin-clean)
// See https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html
void SetWriteOnly() {
mWriteOnly = true;
}
void SetWriteOnly();
bool IsWriteOnly() const {
return mWriteOnly;