Ensure periodic flushing of canvas drawing context
authormdelaney@apple.com <mdelaney@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Oct 2011 00:01:58 +0000 (00:01 +0000)
committermdelaney@apple.com <mdelaney@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Oct 2011 00:01:58 +0000 (00:01 +0000)
commitda7442a277bac1f2ffab0470791ba425b37b4403
tree873284fdb537c7d0073ef2915b2befc45987265b
parentb9dc992e932774f7ab0a0320aca15154250d53bc
Ensure periodic flushing of canvas drawing context
https://bugs.webkit.org/show_bug.cgi?id=70646

Reviewed by Simon Fraser.

No new tests. No current way to track tests that cause hangs or
non-deterministic drops in performance.

* platform/graphics/cg/ImageBufferDataCG.h: Adds a timestamp of last tracked flush.
* platform/graphics/cg/ImageBufferCG.cpp: Ensures periodic flushes on the drawing context.
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::context): Flushes context if we're beyond flush interval.
(WebCore::ImageBuffer::copyNativeImage): Updates last flush timestamp.
(WebCore::ImageBuffer::getUnmultipliedImageData): Updates last flush timestamp.
(WebCore::ImageBuffer::getPremultipliedImageData): Updates last flush timestamp.
(WebCore::ImageBuffer::putUnmultipliedImageData): Updates last flush timestamp.
(WebCore::ImageBuffer::putPremultipliedImageData): Updates last flush timestamp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp
Source/WebCore/platform/graphics/cg/ImageBufferDataCG.h