Changeset 568 for gtkimageview
- Timestamp:
- 09/01/08 05:08:10 (5 years ago)
- Files:
-
- gtkimageview/docs/reference/releasehistory.sgml (modified) (1 diff)
- gtkimageview/src/gtkimageview.c (modified) (2 diffs)
- gtkimageview/src/gtkzooms.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gtkimageview/docs/reference/releasehistory.sgml
r560 r568 18 18 <itemizedlist> 19 19 <listitem> 20 Fix for <ulink url = 21 "http://trac.bjourne.webfactional.com/ticket/23">ticket23</ulink>. To 22 small zoom factors are disallowed which should prevent the 23 filter matrices to become rediculously large and eat up all 24 memory. 25 </listitem> 26 <listitem> 20 27 Horizontal scrolls should not crash GtkImageView anymore. 21 28 </listitem> gtkimageview/src/gtkimageview.c
r560 r568 473 473 474 474 gdouble zoom = MIN (ratio_y, ratio_x); 475 zoom = MIN (zoom, 1.0); 475 476 // Disallow to small zoom factors, they eat up all memory because 477 // the filter matrices becomes to large. See #80925. 478 zoom = CLAMP (zoom, gtk_zooms_get_min_zoom (), 1.0); 476 479 477 480 gtk_image_view_set_zoom_no_center (view, zoom, is_allocating); … … 520 523 return FALSE; 521 524 522 // This is a workaround for #80925. If the image area gets to523 // small, then gdk-pixbuf's scale matrix becomes ridiculously524 // large which causes noticable and wasteful cpu spikes.525 Size alloc = gtk_image_view_get_allocated_size (view);526 if (alloc.width <= 1 || alloc.height <= 1)527 return FALSE;528 529 525 view->is_rendering = TRUE; 530 526 531 527 // Image area is the area on the widget occupied by the pixbuf. 532 528 GdkRectangle image_area; 529 Size alloc = gtk_image_view_get_allocated_size (view); 533 530 gtk_image_view_get_draw_rect (view, &image_area); 534 531 if (image_area.x > 0 || gtkimageview/src/gtkzooms.c
r337 r568 32 32 33 33 static const gdouble ZOOMS[] = { 34 0.0 5, 0.07, 0.10,34 0.02, 0.05, 0.07, 0.10, 35 35 0.15, 0.20, 0.30, 0.50, 0.75, 1.0, 36 36 1.5, 2.0, 3.0, 5.0, 7.5, 10.0,
