Diff
Modified: tags/Safari-538.46/LayoutTests/ChangeLog (171008 => 171009)
--- tags/Safari-538.46/LayoutTests/ChangeLog 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/LayoutTests/ChangeLog 2014-07-11 19:47:40 UTC (rev 171009)
@@ -1,3 +1,15 @@
+2014-07-11 Dean Jackson <d...@apple.com>
+
+ <rdar://problem/17643689>
+ Revert r170675 on this branch.
+
+ * fast/canvas/image-potential-subsample-expected.txt: Removed.
+ * fast/canvas/image-potential-subsample.html: Removed.
+ * fast/canvas/resources/image-8000x8000.jpg: Removed.
+ * fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-potentially-subsampled-image.js: Removed.
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image-expected.txt: Removed.
+ * fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html: Removed.
+
2014-07-11 Lucas Forschler <lforsch...@apple.com>
Merge r171001
Modified: tags/Safari-538.46/Source/WebCore/ChangeLog (171008 => 171009)
--- tags/Safari-538.46/Source/WebCore/ChangeLog 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/Source/WebCore/ChangeLog 2014-07-11 19:47:40 UTC (rev 171009)
@@ -1,3 +1,21 @@
+2014-07-11 Dean Jackson <d...@apple.com>
+
+ <rdar://problem/17643689>
+ Revert r170675 on this branch.
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::cacheFrame):
+ (WebCore::BitmapImage::frameAtIndex):
+ * platform/graphics/BitmapImage.h:
+ (WebCore::FrameData::FrameData):
+ * platform/graphics/cg/BitmapImageCG.cpp:
+ (WebCore::FrameData::clear):
+ (WebCore::BitmapImage::BitmapImage):
+ (WebCore::BitmapImage::draw):
+ (WebCore::BitmapImage::copyUnscaledFrameAtIndex):
+ * platform/graphics/cg/GraphicsContext3DCG.cpp:
+ (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
+
2014-07-11 Lucas Forschler <lforsch...@apple.com>
Merge r171001
Modified: tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.cpp (171008 => 171009)
--- tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.cpp 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.cpp 2014-07-11 19:47:40 UTC (rev 171009)
@@ -166,7 +166,7 @@
#if PLATFORM(IOS)
m_frames[index].m_frame = m_source.createFrameAtIndex(index, &scaleHint);
- m_frames[index].m_subsamplingScale = scaleHint;
+ m_frames[index].m_scale = scaleHint;
#else
m_frames[index].m_frame = m_source.createFrameAtIndex(index);
#endif
@@ -431,7 +431,7 @@
if (index >= m_frames.size() || !m_frames[index].m_frame)
cacheFrame(index, scaleHint);
- else if (std::min(1.0f, scaleHint) > m_frames[index].m_subsamplingScale) {
+ else if (std::min(1.0f, scaleHint) > m_frames[index].m_scale) {
// If the image is already cached, but at too small a size, re-decode a larger version.
int sizeChange = -m_frames[index].m_frameBytes;
ASSERT(static_cast<int>(m_decodedSize) + sizeChange >= 0);
Modified: tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.h (171008 => 171009)
--- tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.h 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/Source/WebCore/platform/graphics/BitmapImage.h 2014-07-11 19:47:40 UTC (rev 171009)
@@ -71,7 +71,7 @@
: m_frame(0)
, m_orientation(DefaultImageOrientation)
#if PLATFORM(IOS)
- , m_subsamplingScale(0)
+ , m_scale(0)
, m_haveInfo(false)
#endif
, m_duration(0)
@@ -94,7 +94,7 @@
NativeImagePtr m_frame;
ImageOrientation m_orientation;
#if PLATFORM(IOS)
- float m_subsamplingScale;
+ float m_scale;
bool m_haveInfo;
#endif
float m_duration;
Modified: tags/Safari-538.46/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp (171008 => 171009)
--- tags/Safari-538.46/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp 2014-07-11 19:47:40 UTC (rev 171009)
@@ -61,7 +61,7 @@
#if PLATFORM(IOS)
m_frameBytes = 0;
- m_subsamplingScale = 1;
+ m_scale = 1;
m_haveInfo = false;
#endif
@@ -114,7 +114,7 @@
m_frames[0].m_haveMetadata = true;
#if PLATFORM(IOS)
- m_frames[0].m_subsamplingScale = 1;
+ m_frames[0].m_scale = 1;
#endif
checkForSolidColor();
@@ -199,12 +199,11 @@
void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp, BlendMode blendMode, ImageOrientationDescription description)
{
CGImageRef image;
- FloatRect srcRectForCurrentFrame = srcRect;
+#if !PLATFORM(IOS)
+ startAnimation();
-#if PLATFORM(IOS)
- if (m_originalSize.width() && m_originalSize.height())
- srcRectForCurrentFrame.scale(m_size.width() / static_cast<float>(m_originalSize.width()), m_size.height() / static_cast<float>(m_originalSize.height()));
-
+ image = frameAtIndex(m_currentFrame);
+#else
startAnimation(DoNotCatchUp);
CGRect transformedDestinationRect = CGRectApplyAffineTransform(destRect, CGContextGetCTM(ctxt->platformContext()));
@@ -213,15 +212,10 @@
if (CGContextGetType(ctxt->platformContext()) == kCGContextTypePDF)
imagePossiblyCopied = adoptCF(copyUnscaledFrameAtIndex(m_currentFrame));
else
- imagePossiblyCopied = frameAtIndex(m_currentFrame, std::min<float>(1.0f, std::max(transformedDestinationRect.size.width / srcRectForCurrentFrame.width(), transformedDestinationRect.size.height / srcRectForCurrentFrame.height())));
-
+ imagePossiblyCopied = frameAtIndex(m_currentFrame, std::min<float>(1.0f, std::max(transformedDestinationRect.size.width / srcRect.width(), transformedDestinationRect.size.height / srcRect.height())));
+
image = imagePossiblyCopied.get();
-#else
- startAnimation();
-
- image = frameAtIndex(m_currentFrame);
#endif
-
if (!image) // If it's too early we won't have an image yet.
return;
@@ -232,7 +226,7 @@
float scale = 1;
#if PLATFORM(IOS)
- scale = m_frames[m_currentFrame].m_subsamplingScale;
+ scale = m_frames[m_currentFrame].m_scale;
#endif
FloatSize selfSize = currentFrameSize();
ImageOrientation orientation;
@@ -240,7 +234,7 @@
if (description.respectImageOrientation() == RespectImageOrientation)
orientation = frameOrientationAtIndex(m_currentFrame);
- ctxt->drawNativeImage(image, selfSize, styleColorSpace, destRect, srcRectForCurrentFrame, scale, compositeOp, blendMode, orientation);
+ ctxt->drawNativeImage(image, selfSize, styleColorSpace, destRect, srcRect, scale, compositeOp, blendMode, orientation);
if (imageObserver())
imageObserver()->didDraw(this);
@@ -255,7 +249,7 @@
if (index >= m_frames.size() || !m_frames[index].m_frame)
cacheFrame(index, 1);
- if (m_frames[index].m_subsamplingScale == 1 && !m_source.isSubsampled())
+ if (m_frames[index].m_scale == 1 && !m_source.isSubsampled())
return CGImageRetain(m_frames[index].m_frame);
return m_source.createFrameAtIndex(index);
Modified: tags/Safari-538.46/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp (171008 => 171009)
--- tags/Safari-538.46/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp 2014-07-11 19:00:24 UTC (rev 171008)
+++ tags/Safari-538.46/Source/WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp 2014-07-11 19:47:40 UTC (rev 171009)
@@ -332,17 +332,7 @@
decoder.setData(m_image->data(), true);
if (!decoder.frameCount())
return false;
-#if PLATFORM(IOS)
- float scaleHint = 1;
- if (m_image->isBitmapImage()) {
- IntSize originalSize = toBitmapImage(m_image)->originalSize();
- if (originalSize.width() && originalSize.height())
- scaleHint = std::min<float>(1.0f, std::max(m_image->size().width() / originalSize.width(), m_image->size().width() / originalSize.height()));
- }
- m_decodedImage = adoptCF(decoder.createFrameAtIndex(0, &scaleHint));
-#else
m_decodedImage = adoptCF(decoder.createFrameAtIndex(0));
-#endif
m_cgImage = m_decodedImage.get();
} else
m_cgImage = m_image->nativeImageForCurrentFrame();