Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(965)

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/loader/cache/CachedImage.cpp » ('j') | Source/core/loader/cache/CachedImage.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index b2701331d1dffccff104b5be49378965be011792..0860353c00f7c8b83d7def99eb77290194cefad3 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -1275,9 +1275,9 @@ void CanvasRenderingContext2D::drawImage(ImageBitmap* bitmap,
if (!imageRect.contains(normalizedSrcRect))
return;
- Image* imageForRendering = bitmap->bitmapImage();
+ RefPtr<Image> imageForRendering = bitmap->bitmapImage();
- drawImageInternal(imageForRendering, normalizedSrcRect, actualDstRect, state().m_globalComposite, state().m_globalBlend);
+ drawImageInternal(imageForRendering.get(), normalizedSrcRect, actualDstRect, state().m_globalComposite, state().m_globalBlend);
}
void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, float x, float y, ExceptionCode& ec)
« no previous file with comments | « no previous file | Source/core/loader/cache/CachedImage.cpp » ('j') | Source/core/loader/cache/CachedImage.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698