Open Bug 500027 Opened 15 years ago Updated 2 years ago

Cache operation sources in cairo quartz surface

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: vlad, Unassigned)

Details

While looking at the perf testcase in bug 487693, we do a lot worse than Safari on it. Our profile looks like: 87.7% XUL nsIDOMCanvasRenderingContext2D_FillRect(JSContext*, unsigned int, long*) 74.1% XUL nsCanvasRenderingContext2D::FillRect(float, float, float, float) 73.8% XUL nsCanvasRenderingContext2D::DrawRect(gfxRect const&, nsCanvasRenderingContext2D::Style) 64.8% XUL nsCanvasRenderingContext2D::DrawPath(nsCanvasRenderingContext2D::Style, gfxRect*) 60.1% XUL _moz_cairo_fill_preserve 59.7% XUL _cairo_gstate_fill 58.9% XUL _cairo_surface_fill 57.8% XUL _cairo_quartz_surface_fill 21.4% CoreGraphics CGContextFillPath 19.7% XUL _cairo_quartz_setup_source 6.1% XUL _cairo_quartz_cairo_path_to_quartz_context 6.0% CoreGraphics CGContextRestoreGState 2.3% CoreGraphics CGContextSaveGState 0.3% XUL _cairo_path_fixed_is_box 0.3% XUL _cairo_quartz_teardown_source Basically we're spending a lot of time doing repetitive bookkeeping -- source setup/teardown, converting paths, etc. We should try to cache this stuff aggressively from call to call, especially for solid colors; should help a lot with repetitive operations that use the same color.
Flags: wanted1.9.2?
Flags: blocking1.9.2?
Flags: wanted1.9.2?
Flags: wanted1.9.2-
Flags: blocking1.9.2?
Flags: blocking1.9.2-
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.