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

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

Issue 1382883002: Fixing performance issue of creating imagebitmap from ImageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change enum type name and remove temps 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..cae4fbb1b70f014d4cf0cef8c7a2c51a84d7ff7d 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -98,7 +98,7 @@ 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());
+ OwnPtr<ImageBuffer> buffer = ImageBuffer::create(data->size(), Opaque, DoNotInitializeImagePixels);
if (!buffer)
return;

Powered by Google App Engine
This is Rietveld 408576698