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

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

Issue 1693863002: Revert of Revise the code for premultiplyAlpha=false for createImageBitmap(HTMLCanvasElement) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 629ceefa07719b5d6ca0aca96e779a538b54e1a8..ba2a198d2f5adad91692e56ab4517e2a99285e5d 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -181,10 +181,7 @@
bool imageOrientationFlipYFlag;
bool premultiplyAlphaEnabledFlag;
parseOptions(options, imageOrientationFlipYFlag, premultiplyAlphaEnabledFlag);
- // canvas is always premultiplied, so set the last parameter to true and convert to un-premul later
- m_image = cropImage(canvas->copiedImage(BackBuffer, PreferAcceleration).get(), cropRect, imageOrientationFlipYFlag, true);
- if (!premultiplyAlphaEnabledFlag)
- m_image = StaticBitmapImage::create(adoptRef(premulSkImageToUnPremul(m_image->imageForCurrentFrame().get())));
+ m_image = cropImage(canvas->copiedImage(BackBuffer, PreferAcceleration).get(), cropRect, imageOrientationFlipYFlag, premultiplyAlphaEnabledFlag);
m_image->setOriginClean(canvas->originClean());
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698