Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 1382883002: Fixing performance issue of creating imagebitmap from ImageData (Closed) Base URL:
Patch Set: remove the benchmark test which has been landed already Created 5 years, 2 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
Index: third_party/WebKit/Source/core/frame/ImageBitmap.cpp
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 62388bc0fb578bd02059e4556ea598892a587f45..100ce271b6adbedbd69b6ce1f4701d9ab15ca908 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -98,7 +98,9 @@ ImageBitmap::ImageBitmap(ImageData* data, const IntRect& cropRect)
, m_bitmapOffset(IntPoint())
IntRect srcRect = intersection(cropRect, IntRect(IntPoint(), data->size()));
- OwnPtr<ImageBuffer> buffer = ImageBuffer::create(data->size());
+ OpacityMode opacityMode = Opaque;
+ ImageBitmapSourceType sourceType = FromImageData;
Justin Novosad 2015/10/14 14:25:28 No need to use temporaries like this when you alre
+ OwnPtr<ImageBuffer> buffer = ImageBuffer::create(data->size(), opacityMode, sourceType);
if (!buffer)

Powered by Google App Engine
This is Rietveld 408576698