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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp

Issue 1732563007: [NOT FOR COMMIT] Pass defaultObjectSize to get image size (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/Source/platform/graphics/StaticBitmapImage.cpp ('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/platform/graphics/gpu/WebGLImageConversion.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
index 38849d9937831680cd1affa8a12408eaea61b1cb..773676ed9717c0a3dc501186b2055f4a04af4adc 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
@@ -2133,7 +2133,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
RefPtr<SkImage> skiaImage = m_image->imageForCurrentFrame();
SkImageInfo info = skiaImage
- ? SkImageInfo::MakeN32Premul(m_image->width(), m_image->height())
+ ? SkImageInfo::MakeN32Premul(m_image->defaultConcreteObjectSizeWidth(), m_image->defaultConcreteObjectSizeHeight())
: SkImageInfo::MakeUnknown();
m_alphaOp = AlphaDoNothing;
bool hasAlpha = skiaImage ? !skiaImage->isOpaque() : true;
@@ -2185,7 +2185,7 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
m_imageHeight = skiaImage->height();
// Fail if the image was downsampled because of memory limits.
- if (m_imageWidth != (unsigned)m_image->width() || m_imageHeight != (unsigned)m_image->height())
+ if (m_imageWidth != (unsigned)m_image->defaultConcreteObjectSizeWidth() || m_imageHeight != (unsigned)m_image->defaultConcreteObjectSizeHeight())
return;
m_imagePixelLocker.emplace(skiaImage, info.alphaType());
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698