Reviewed by Mark Rowe.
Re-use a single static dummy surface rather than creating and
destroying a surface for each CairoPath.
* platform/graphics/cairo/CairoPath.h:
(WebCore::CairoPath::CairoPath):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29153
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-01-04 Alp Toker <alp@atoker.com>
+
+ Reviewed by Mark Rowe.
+
+ Re-use a single static dummy surface rather than creating and
+ destroying a surface for each CairoPath.
+
+ * platform/graphics/cairo/CairoPath.h:
+ (WebCore::CairoPath::CairoPath):
+
2008-01-04 Mark Rowe <mrowe@apple.com>
Tiger build fix.
namespace WebCore {
+ // This is necessary since cairo_path_fixed_t isn't exposed in Cairo's public API.
struct CairoPath {
cairo_t* m_cr;
CairoPath()
{
- cairo_surface_t* pathSurface = cairo_image_surface_create(CAIRO_FORMAT_A8, 1, 1);
+ static cairo_surface_t* pathSurface = cairo_image_surface_create(CAIRO_FORMAT_A8, 1, 1);
m_cr = cairo_create(pathSurface);
- cairo_surface_destroy(pathSurface);
}
~CairoPath()