|
Lines 37-42
a/Source/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp_sec1
|
| 37 |
#include "PlatformContextCairo.h" |
37 |
#include "PlatformContextCairo.h" |
| 38 |
#include "Timer.h" |
38 |
#include "Timer.h" |
| 39 |
#include <cairo.h> |
39 |
#include <cairo.h> |
|
|
40 |
#include <wtf/StdLibExtras.h> |
| 40 |
|
41 |
|
| 41 |
using WTF::max; |
42 |
using WTF::max; |
| 42 |
|
43 |
|
|
Lines 55-63
class PurgeScratchBufferTimer : public TimerBase {
a/Source/WebCore/platform/graphics/cairo/ContextShadowCairo.cpp_sec2
|
| 55 |
private: |
56 |
private: |
| 56 |
virtual void fired() { purgeScratchBuffer(); } |
57 |
virtual void fired() { purgeScratchBuffer(); } |
| 57 |
}; |
58 |
}; |
| 58 |
static PurgeScratchBufferTimer purgeScratchBufferTimer; |
59 |
|
| 59 |
static void scheduleScratchBufferPurge() |
60 |
static void scheduleScratchBufferPurge() |
| 60 |
{ |
61 |
{ |
|
|
62 |
DEFINE_STATIC_LOCAL(PurgeScratchBufferTimer, purgeScratchBufferTimer, ()); |
| 61 |
if (purgeScratchBufferTimer.isActive()) |
63 |
if (purgeScratchBufferTimer.isActive()) |
| 62 |
purgeScratchBufferTimer.stop(); |
64 |
purgeScratchBufferTimer.stop(); |
| 63 |
purgeScratchBufferTimer.startOneShot(2); |
65 |
purgeScratchBufferTimer.startOneShot(2); |