Title: [92295] trunk/Source/WebCore
- Revision
- 92295
- Author
- [email protected]
- Date
- 2011-08-03 11:38:26 -0700 (Wed, 03 Aug 2011)
Log Message
WebCore images backing CG patterns should be released on the main thread
https://bugs.webkit.org/show_bug.cgi?id=65630
Reviewed by Sam Weinig.
* platform/graphics/cg/PatternCG.cpp:
(WebCore::patternReleaseOnMainThreadCallback):
Deref the image.
(WebCore::patternReleaseCallback):
Call callOnMainThread.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92294 => 92295)
--- trunk/Source/WebCore/ChangeLog 2011-08-03 18:11:12 UTC (rev 92294)
+++ trunk/Source/WebCore/ChangeLog 2011-08-03 18:38:26 UTC (rev 92295)
@@ -1,3 +1,17 @@
+2011-08-03 Anders Carlsson <[email protected]>
+
+ WebCore images backing CG patterns should be released on the main thread
+ https://bugs.webkit.org/show_bug.cgi?id=65630
+
+ Reviewed by Sam Weinig.
+
+ * platform/graphics/cg/PatternCG.cpp:
+ (WebCore::patternReleaseOnMainThreadCallback):
+ Deref the image.
+
+ (WebCore::patternReleaseCallback):
+ Call callOnMainThread.
+
2011-08-03 Luke Macpherson <[email protected]>
Use appropriate macro for CSSPropertyImageRendering.
Modified: trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp (92294 => 92295)
--- trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp 2011-08-03 18:11:12 UTC (rev 92294)
+++ trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp 2011-08-03 18:38:26 UTC (rev 92295)
@@ -29,8 +29,8 @@
#include "AffineTransform.h"
#include "GraphicsContext.h"
-
#include <ApplicationServices/ApplicationServices.h>
+#include <wtf/MainThread.h>
namespace WebCore {
@@ -45,11 +45,16 @@
CGContextDrawImage(context, rect, platformImage);
}
-static void patternReleaseCallback(void* info)
+static void patternReleaseOnMainThreadCallback(void* info)
{
static_cast<Image*>(info)->deref();
}
+static void patternReleaseCallback(void* info)
+{
+ callOnMainThread(patternReleaseOnMainThreadCallback, info);
+}
+
CGPatternRef Pattern::createPlatformPattern(const AffineTransform& userSpaceTransformation) const
{
IntRect tileRect = tileImage()->rect();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes