Compare commits
No commits in common. "9045898fb68296fbe2b2dae3016b1e8e9fe1f509" and "cdb8d852a6e458ff9fe5f9e7f58aaa55f8ddb1cf" have entirely different histories.
9045898fb6
...
cdb8d852a6
@ -225,14 +225,12 @@ rescale_thumbnail(cairo_surface_t *thumbnail)
|
||||
struct pixman_f_transform xform_floating;
|
||||
struct pixman_transform xform;
|
||||
|
||||
// PIXMAN_a8r8g8b8_sRGB can be used for gamma-correct results,
|
||||
// but it's an incredibly slow transformation
|
||||
pixman_format_code_t format = PIXMAN_a8r8g8b8;
|
||||
|
||||
pixman_image_t *src = pixman_image_create_bits(format, width, height,
|
||||
pixman_image_t *src = pixman_image_create_bits(
|
||||
PIXMAN_a8r8g8b8_sRGB, width, height,
|
||||
(uint32_t *) cairo_image_surface_get_data(thumbnail),
|
||||
cairo_image_surface_get_stride(thumbnail));
|
||||
pixman_image_t *dest = pixman_image_create_bits(format,
|
||||
pixman_image_t *dest = pixman_image_create_bits(
|
||||
PIXMAN_a8r8g8b8_sRGB,
|
||||
cairo_image_surface_get_width(scaled),
|
||||
cairo_image_surface_get_height(scaled),
|
||||
(uint32_t *) cairo_image_surface_get_data(scaled),
|
||||
|
@ -135,10 +135,8 @@ fastiv_view_draw(GtkWidget *widget, cairo_t *cr)
|
||||
cairo_set_source_surface(
|
||||
cr, self->surface, x / self->scale, y / self->scale);
|
||||
|
||||
cairo_pattern_t *pattern = cairo_get_source(cr);
|
||||
cairo_pattern_set_extend(pattern, CAIRO_EXTEND_PAD);
|
||||
// TODO(p): Prescale it ourselves to an off-screen bitmap, gamma-correctly.
|
||||
cairo_pattern_set_filter(pattern, CAIRO_FILTER_GOOD);
|
||||
cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_GOOD);
|
||||
|
||||
cairo_paint(cr);
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user