Diff
Modified: trunk/Source/WebCore/ChangeLog (116908 => 116909)
--- trunk/Source/WebCore/ChangeLog 2012-05-13 23:47:02 UTC (rev 116908)
+++ trunk/Source/WebCore/ChangeLog 2012-05-13 23:48:25 UTC (rev 116909)
@@ -1,3 +1,11 @@
+2012-05-13 Darin Adler <[email protected]>
+
+ Roll out local changes accidentally landed in r116905.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ * platform/graphics/cg/ImageCG.cpp:
+
2012-05-13 Rob Buis <[email protected]>
Use emptyString instead of String("")
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (116908 => 116909)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2012-05-13 23:47:02 UTC (rev 116908)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h 2012-05-13 23:48:25 UTC (rev 116909)
@@ -262,7 +262,7 @@
void applyFillPattern();
void drawPath(const Path&);
- void drawNativeImage(CGImageRef, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientation = DefaultImageOrientation);
+ void drawNativeImage(NativeImagePtr, const FloatSize& selfSize, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect, CompositeOperator = CompositeSourceOver, ImageOrientation = DefaultImageOrientation);
// Allow font smoothing (LCD antialiasing). Not part of the graphics state.
void setAllowsFontSmoothing(bool);
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (116908 => 116909)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2012-05-13 23:47:02 UTC (rev 116908)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2012-05-13 23:48:25 UTC (rev 116909)
@@ -74,11 +74,6 @@
using namespace std;
namespace WebCore {
-
-static RetainPtr<CGImageRef> subimage(CGImageRef image, const FloatRect& rect)
-{
- return adoptCF(CGImageCreateWithImageInRect(image, rect));
-}
static CGColorSpaceRef createLinearSRGBColorSpace()
{
@@ -217,7 +212,7 @@
subimageRect.setHeight(ceilf(subimageRect.height() + topPadding));
adjustedDestRect.setHeight(subimageRect.height() / yScale);
- image = subimage(image.get(), subimageRect);
+ image.adoptCF(CGImageCreateWithImageInRect(image.get(), subimageRect));
if (currHeight < srcRect.maxY()) {
ASSERT(CGImageGetHeight(image.get()) == currHeight - CGRectIntegral(srcRect).origin.y);
adjustedDestRect.setHeight(CGImageGetHeight(image.get()) / yScale);
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp (116908 => 116909)
--- trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp 2012-05-13 23:47:02 UTC (rev 116908)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageCG.cpp 2012-05-13 23:48:25 UTC (rev 116909)
@@ -192,7 +192,7 @@
{
startAnimation();
- CGImageRef image = frameAtIndex(m_currentFrame);
+ RetainPtr<CGImageRef> image = frameAtIndex(m_currentFrame);
if (!image) // If it's too early we won't have an image yet.
return;
@@ -207,7 +207,7 @@
if (shouldRespectImageOrientation == RespectImageOrientation)
orientation = frameOrientationAtIndex(m_currentFrame);
- ctxt->drawNativeImage(image, selfSize, styleColorSpace, destRect, srcRect, compositeOp, orientation);
+ ctxt->drawNativeImage(image.get(), selfSize, styleColorSpace, destRect, srcRect, compositeOp, orientation);
if (imageObserver())
imageObserver()->didDraw(this);