diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2009-01-02 11:39:51 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2009-01-02 11:39:51 +0000 |
commit | 00f93b05b70ef4e841608a4ddbd6db36474c6d1b (patch) | |
tree | a50bc1f23a1d022b1ceafd19aa369c95e2477d56 /pango-view/viewer-main.c | |
parent | 4898ac87e81e7c748147aff017368608d8c6c9bb (diff) | |
download | pango-00f93b05b70ef4e841608a4ddbd6db36474c6d1b.tar.gz |
Make sure we measure layout with the same surface type as the final
2009-01-02 Behdad Esfahbod <behdad@gnome.org>
* pango-view/viewer-main.c (main):
* pango-view/viewer-pangocairo.c (pangocairo_view_render):
* pango-view/viewer-pangoft2.c (pangoft2_view_render):
* pango-view/viewer-pangox.c (pangox_view_render):
* pango-view/viewer-pangoxft.c (pangoxft_view_render):
* pango-view/viewer.h:
Make sure we measure layout with the same surface type as the
final target. Also reduces fonts loaded by the pangocairo backend.
svn path=/trunk/; revision=2777
Diffstat (limited to 'pango-view/viewer-main.c')
-rw-r--r-- | pango-view/viewer-main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pango-view/viewer-main.c b/pango-view/viewer-main.c index 8523ee38..2b664682 100644 --- a/pango-view/viewer-main.c +++ b/pango-view/viewer-main.c @@ -57,10 +57,13 @@ main (int argc, instance = view->create (view); context = view->get_context (instance); - do_output (context, NULL, NULL, NULL, NULL, &width, &height); + width = height = 1; + surface = view->create_surface (instance, width, height); + view->render (instance, surface, context, &width, &height, NULL); + view->destroy_surface (instance, surface); surface = view->create_surface (instance, width, height); for (run = 0; run < MAX(1,opt_runs); run++) - view->render (instance, surface, context, width, height, NULL); + view->render (instance, surface, context, &width, &height, NULL); if (opt_output) { @@ -123,7 +126,7 @@ main (int argc, if (!state) break; - view->render (instance, surface, context, width, height, state); + view->render (instance, surface, context, &width, &height, state); } if (view->destroy_window) |