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-pdf.c | |
parent | 72b6299c1239c53baa38f44bc898c0c184ce3c71 (diff) | |
download | cairo-d673b9547f29bec74ccaa74e2660223cc2feb5c8.tar.gz |
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-pdf.c')
-rw-r--r-- | boilerplate/cairo-boilerplate-pdf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c index ea66c23e5..53bf55bae 100644 --- a/boilerplate/cairo-boilerplate-pdf.c +++ b/boilerplate/cairo-boilerplate-pdf.c @@ -248,6 +248,7 @@ static const cairo_boilerplate_target_t targets[] = { CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED, 0, "cairo_pdf_surface_create", _cairo_boilerplate_pdf_create_surface, + cairo_surface_create_similar, _cairo_boilerplate_pdf_force_fallbacks, _cairo_boilerplate_pdf_finish_surface, _cairo_boilerplate_pdf_get_image_surface, @@ -260,6 +261,7 @@ static const cairo_boilerplate_target_t targets[] = { CAIRO_SURFACE_TYPE_RECORDING, CAIRO_CONTENT_COLOR, 0, "cairo_pdf_surface_create", _cairo_boilerplate_pdf_create_surface, + cairo_surface_create_similar, _cairo_boilerplate_pdf_force_fallbacks, _cairo_boilerplate_pdf_finish_surface, _cairo_boilerplate_pdf_get_image_surface, |