[Mac] 9 WebGL conformance failures after r159518.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Nov 2013 23:06:22 +0000 (23:06 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Nov 2013 23:06:22 +0000 (23:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124608

Reviewed by Dean Jackson.

Once we removed the CIImage drawing path, there was no longer any reason to flip the
CGImageRef before drawing to the provided GraphicsContext.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

index 4a5be62..ec4bacb 100644 (file)
@@ -1,3 +1,16 @@
+2013-11-19  Jer Noble  <jer.noble@apple.com>
+
+        [Mac] 9 WebGL conformance failures after r159518.
+        https://bugs.webkit.org/show_bug.cgi?id=124608
+
+        Reviewed by Dean Jackson.
+
+        Once we removed the CIImage drawing path, there was no longer any reason to flip the
+        CGImageRef before drawing to the provided GraphicsContext.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
+
 2013-11-19  Chris Fleizach  <cfleizach@apple.com>
 
         Web Speech API crashes onboundary event handling with reload
index ec07c99..363ad84 100644 (file)
@@ -1375,19 +1375,16 @@ void MediaPlayerPrivateAVFoundationObjC::updateLastImage()
         m_lastImage = createImageFromPixelBuffer(pixelBuffer.get());
 }
 
-void MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput(GraphicsContext* context, const IntRect& rect)
+void MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput(GraphicsContext* context, const IntRect& outputRect)
 {
     updateLastImage();
 
     if (m_lastImage) {
         GraphicsContextStateSaver stateSaver(*context);
-        context->translate(rect.x(), rect.y() + rect.height());
-        context->scale(FloatSize(1.0f, -1.0f));
 
-        CGRect outputRect = { CGPointZero, rect.size() };
-        CGRect imageRect = CGRectMake(0, 0, CGImageGetWidth(m_lastImage.get()), CGImageGetHeight(m_lastImage.get()));
+        IntRect imageRect(0, 0, CGImageGetWidth(m_lastImage.get()), CGImageGetHeight(m_lastImage.get()));
 
-        context->drawNativeImage(m_lastImage.get(), FloatSize(imageRect.size), ColorSpaceDeviceRGB, FloatRect(outputRect), FloatRect(imageRect));
+        context->drawNativeImage(m_lastImage.get(), imageRect.size(), ColorSpaceDeviceRGB, outputRect, imageRect);
 
         // If we have created an AVAssetImageGenerator in the past due to m_videoOutput not having an available
         // video frame, destroy it now that it is no longer needed.