Title: [106278] trunk/Source/WebCore
Revision
106278
Author
[email protected]
Date
2012-01-30 12:59:01 -0800 (Mon, 30 Jan 2012)

Log Message

Limit periodic flushing inside ImageBufferCG to just Lion
https://bugs.webkit.org/show_bug.cgi?id=77353
<rdar://problem/10328309>

Reviewed by Chris Marrin.

* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageBufferDataCG.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106277 => 106278)


--- trunk/Source/WebCore/ChangeLog	2012-01-30 20:57:56 UTC (rev 106277)
+++ trunk/Source/WebCore/ChangeLog	2012-01-30 20:59:01 UTC (rev 106278)
@@ -1,3 +1,14 @@
+2012-01-28  Matthew Delaney  <[email protected]>
+
+        Limit periodic flushing inside ImageBufferCG to just Lion
+        https://bugs.webkit.org/show_bug.cgi?id=77353
+        <rdar://problem/10328309>
+
+        Reviewed by Chris Marrin.
+
+        * platform/graphics/cg/ImageBufferCG.cpp:
+        * platform/graphics/cg/ImageBufferDataCG.h:
+
 2012-01-30  Tommy Widenflycht  <[email protected]>
 
         Memory leak caused by PeerConnection add a NULL media stream

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (106277 => 106278)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2012-01-30 20:57:56 UTC (rev 106277)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp	2012-01-30 20:59:01 UTC (rev 106278)
@@ -38,7 +38,6 @@
 #include <math.h>
 #include <wtf/Assertions.h>
 #include <wtf/CheckedArithmetic.h>
-#include <wtf/CurrentTime.h>
 #include <wtf/MainThread.h>
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/RetainPtr.h>
@@ -53,6 +52,10 @@
 #include <IOSurface/IOSurface.h>
 #endif
 
+#if defined(BUILDING_ON_LION)
+#include <wtf/CurrentTime.h>
+#endif
+
 using namespace std;
 
 namespace WebCore {
@@ -169,7 +172,9 @@
     m_context->scale(FloatSize(1, -1));
     m_context->translate(0, -height.unsafeGet());
     m_context->setIsAcceleratedContext(accelerateRendering);
+#if defined(BUILDING_ON_LION)
     m_data.m_lastFlushTime = currentTimeMS();
+#endif
     success = true;
 }
 
@@ -184,6 +189,7 @@
 
 GraphicsContext* ImageBuffer::context() const
 {
+#if defined(BUILDING_ON_LION)
     // Force a flush if last flush was more than 20ms ago
     if (m_context->isAcceleratedContext()) {
         double elapsedTime = currentTimeMS() - m_data.m_lastFlushTime;
@@ -195,6 +201,7 @@
             m_data.m_lastFlushTime = currentTimeMS();
         }
     }
+#endif
 
     return m_context.get();
 }
@@ -228,7 +235,9 @@
 #if USE(IOSURFACE_CANVAS_BACKING_STORE)
     else {
         image = wkIOSurfaceContextCreateImage(context()->platformContext());
+#if defined(BUILDING_ON_LION)
         m_data.m_lastFlushTime = currentTimeMS();
+#endif
     }
 #endif
 
@@ -280,7 +289,9 @@
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
+#if defined(BUILDING_ON_LION)
         m_data.m_lastFlushTime = currentTimeMS();
+#endif
     }
     return m_data.getData(rect, m_size, m_context->isAcceleratedContext(), true);
 }
@@ -289,7 +300,9 @@
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
+#if defined(BUILDING_ON_LION)
         m_data.m_lastFlushTime = currentTimeMS();
+#endif
     }
     return m_data.getData(rect, m_size, m_context->isAcceleratedContext(), false);
 }
@@ -298,7 +311,9 @@
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
+#if defined(BUILDING_ON_LION)
         m_data.m_lastFlushTime = currentTimeMS();
+#endif
     }
     m_data.putData(source, sourceSize, sourceRect, destPoint, m_size, m_context->isAcceleratedContext(), true);
 }
@@ -307,7 +322,9 @@
 {
     if (m_context->isAcceleratedContext()) {
         CGContextFlush(context()->platformContext());
+#if defined(BUILDING_ON_LION)
         m_data.m_lastFlushTime = currentTimeMS();
+#endif
     }
     m_data.putData(source, sourceSize, sourceRect, destPoint, m_size, m_context->isAcceleratedContext(), false);
 }

Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h (106277 => 106278)


--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h	2012-01-30 20:57:56 UTC (rev 106277)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h	2012-01-30 20:59:01 UTC (rev 106278)
@@ -54,7 +54,9 @@
     Checked<unsigned, RecordOverflow> m_bytesPerRow;
     CGColorSpaceRef m_colorSpace;
     RetainPtr<IOSurfaceRef> m_surface;
+#if defined(BUILDING_ON_LION)
     mutable double m_lastFlushTime;
+#endif
 
     PassRefPtr<ByteArray> getData(const IntRect& rect, const IntSize& size, bool accelerateRendering, bool unmultiplied) const;
     void putData(ByteArray*& source, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint, const IntSize& size, bool accelerateRendering, bool unmultiplied);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to