Title: [91378] trunk/Source/WebCore
- Revision
- 91378
- Author
- [email protected]
- Date
- 2011-07-20 11:07:47 -0700 (Wed, 20 Jul 2011)
Log Message
gtk shouldn't have global variables for timers.
https://bugs.webkit.org/show_bug.cgi?id=64871
Reviewed by Martin Robinson.
No new functionality exposed so no new tests.
* platform/graphics/cairo/ContextShadowCairo.cpp:
(WebCore::scheduleScratchBufferPurge): Changed global variable to DEFINE_STATIC_LOCAL.
* platform/gtk/WidgetRenderingContext.cpp:
(WebCore::scheduleScratchBufferPurge): Ditto.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91377 => 91378)
--- trunk/Source/WebCore/ChangeLog 2011-07-20 17:01:48 UTC (rev 91377)
+++ trunk/Source/WebCore/ChangeLog 2011-07-20 18:07:47 UTC (rev 91378)
@@ -1,3 +1,17 @@
+2011-07-20 David Levin <[email protected]>
+
+ gtk shouldn't have global variables for timers.
+ https://bugs.webkit.org/show_bug.cgi?id=64871
+
+ Reviewed by Martin Robinson.
+
+ No new functionality exposed so no new tests.
+
+ * platform/graphics/cairo/ContextShadowCairo.cpp:
+ (WebCore::scheduleScratchBufferPurge): Changed global variable to DEFINE_STATIC_LOCAL.
+ * platform/gtk/WidgetRenderingContext.cpp:
+ (WebCore::scheduleScratchBufferPurge): Ditto.
+
2011-07-20 Gustavo Noronha Silva <[email protected]>
[GTK] REGRESSION(r86436): does not add newlines when return is pressed with some modifiers held
Modified: trunk/Source/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp (91377 => 91378)
--- trunk/Source/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp 2011-07-20 17:01:48 UTC (rev 91377)
+++ trunk/Source/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp 2011-07-20 18:07:47 UTC (rev 91378)
@@ -37,6 +37,7 @@
#include "PlatformContextCairo.h"
#include "Timer.h"
#include <cairo.h>
+#include <wtf/StdLibExtras.h>
using WTF::max;
@@ -55,9 +56,10 @@
private:
virtual void fired() { purgeScratchBuffer(); }
};
-static PurgeScratchBufferTimer purgeScratchBufferTimer;
+
static void scheduleScratchBufferPurge()
{
+ DEFINE_STATIC_LOCAL(PurgeScratchBufferTimer, purgeScratchBufferTimer, ());
if (purgeScratchBufferTimer.isActive())
purgeScratchBufferTimer.stop();
purgeScratchBufferTimer.startOneShot(2);
Modified: trunk/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp (91377 => 91378)
--- trunk/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp 2011-07-20 17:01:48 UTC (rev 91377)
+++ trunk/Source/WebCore/platform/gtk/WidgetRenderingContext.cpp 2011-07-20 18:07:47 UTC (rev 91378)
@@ -39,6 +39,7 @@
#include "Timer.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
+#include <wtf/StdLibExtras.h>
namespace WebCore {
@@ -58,9 +59,10 @@
private:
virtual void fired() { purgeScratchBuffer(); }
};
-static PurgeScratchBufferTimer purgeScratchBufferTimer;
+
static void scheduleScratchBufferPurge()
{
+ DEFINE_STATIC_LOCAL(PurgeScratchBufferTimer, purgeScratchBufferTimer, ());
if (purgeScratchBufferTimer.isActive())
purgeScratchBufferTimer.stop();
purgeScratchBufferTimer.startOneShot(2);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes