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

Unified Diff: Source/core/platform/graphics/Image.cpp

Issue 15466003: Remove image decoder down sampling (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Source/core/platform/graphics/Image.cpp
diff --git a/Source/core/platform/graphics/Image.cpp b/Source/core/platform/graphics/Image.cpp
index 4187cca6af102b460b25efd5b3f674c9ab49b035..033b23cf712bc6ab97f2d746c3cf19ad46a8bf87 100644
--- a/Source/core/platform/graphics/Image.cpp
+++ b/Source/core/platform/graphics/Image.cpp
@@ -169,23 +169,6 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo
startAnimation();
}
-#if ENABLE(IMAGE_DECODER_DOWN_SAMPLING)
-FloatRect Image::adjustSourceRectForDownSampling(const FloatRect& srcRect, const IntSize& scaledSize) const
-{
- const IntSize unscaledSize = size();
- if (unscaledSize == scaledSize)
- return srcRect;
-
- // Image has been down-sampled.
- float xscale = static_cast<float>(scaledSize.width()) / unscaledSize.width();
- float yscale = static_cast<float>(scaledSize.height()) / unscaledSize.height();
- FloatRect scaledSrcRect = srcRect;
- scaledSrcRect.scale(xscale, yscale);
-
- return scaledSrcRect;
-}
-#endif
-
void Image::computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHeight, FloatSize& intrinsicRatio)
{
intrinsicRatio = size();

Powered by Google App Engine
This is Rietveld 408576698