summaryrefslogtreecommitdiffstats
path: root/dom/canvas/CanvasRenderingContext2D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/CanvasRenderingContext2D.cpp')
-rw-r--r--dom/canvas/CanvasRenderingContext2D.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp
index 83fe205e35..cf20f4f7c3 100644
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -1074,6 +1074,7 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(
}
CanvasRenderingContext2D::~CanvasRenderingContext2D() {
+ CanvasImageCache::NotifyCanvasDestroyed(this);
RemovePostRefreshObserver();
RemoveShutdownObserver();
ResetBitmap();
@@ -5221,8 +5222,8 @@ void CanvasRenderingContext2D::DrawImage(const CanvasImageSource& aImage,
element = video;
}
- srcSurf = CanvasImageCache::LookupCanvas(element, mCanvasElement, mTarget,
- &imgSize, &intrinsicImgSize);
+ srcSurf = CanvasImageCache::LookupCanvas(element, this, mTarget, &imgSize,
+ &intrinsicImgSize);
}
DirectDrawInfo drawInfo;
@@ -5267,7 +5268,7 @@ void CanvasRenderingContext2D::DrawImage(const CanvasImageSource& aImage,
if (res.mSourceSurface) {
if (res.mImageRequest) {
- CanvasImageCache::NotifyDrawImage(element, mCanvasElement, mTarget,
+ CanvasImageCache::NotifyDrawImage(element, this, mTarget,
res.mSourceSurface, imgSize,
intrinsicImgSize);
}