diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-02 09:11:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-02 09:11:32 +0100 |
commit | d673b9547f29bec74ccaa74e2660223cc2feb5c8 (patch) | |
tree | ce720589d39753a30a782f38eae61c65faf8e02c /boilerplate/cairo-boilerplate-win32.c | |
parent | 72b6299c1239c53baa38f44bc898c0c184ce3c71 (diff) |
boilerplate: Introduce create_similar hook
A deficiency of cairo-perf-trace is that it currently always uses similar
surfaces for new surface which are kindly cleared by Cairo. This does
not accurately reflect the captured trace and introduces large bandwidth
overheads that distort the profiles.
So we introduce a new boilerplate hook so that the targets can create a
surface without incurring additional overheads.
[Fixes the broken partial commit of bf1b08d066e.]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'boilerplate/cairo-boilerplate-win32.c')
-rw-r--r-- | boilerplate/cairo-boilerplate-win32.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-win32.c b/boilerplate/cairo-boilerplate-win32.c index 5194befc2..f7be6634e 100644 --- a/boilerplate/cairo-boilerplate-win32.c +++ b/boilerplate/cairo-boilerplate-win32.c @@ -54,6 +54,7 @@ static const cairo_boilerplate_target_t targets[] = { CAIRO_SURFACE_TYPE_WIN32, CAIRO_CONTENT_COLOR, 0, "cairo_win32_surface_create_with_dib", _cairo_boilerplate_win32_create_surface, + cairo_surface_create_similar, NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, @@ -67,6 +68,7 @@ static const cairo_boilerplate_target_t targets[] = { CAIRO_SURFACE_TYPE_WIN32, CAIRO_CONTENT_COLOR_ALPHA, 0, "cairo_win32_surface_create_with_dib", _cairo_boilerplate_win32_create_surface, + cairo_surface_create_similar, NULL, NULL, _cairo_boilerplate_get_image_surface, cairo_surface_write_to_png, |