static cairo_recursive_mutex_t shadow_caches_mutex;
static unsigned shadow_caches_mutex_depth = 0;
static cairo_atomic_int_t shadow_caches_ref_count = 0;
+static float shadow_scaling_factor = 0.5f;
static void
_cairo_image_shadow_caches_init (void)
if (shadow_caches_ref_count == 1)
cairo_list_init (&shadow_caches);
+ const char *env_value = getenv ("CUSTOM_SCALING_FACTOR");
+ if (env_value) {
+ float scaling_factor;
+ sscanf(env_value, "%f", &scaling_factor);
+ shadow_scaling_factor = scaling_factor;
+ }
+ else{
+ shadow_scaling_factor = 0.5f;
+ }
+
CAIRO_MUTEX_UNLOCK (shadow_caches_mutex);
}
else if (width > MAX_IMAGE_SHADOW_SIZE * 2)
shadow_width = MAX_IMAGE_SHADOW_SIZE;
else
- shadow_width = width * 0.5;
+ shadow_width = width * shadow_scaling_factor;
}
else {
if (width > MAX_IMAGE_SHADOW_SIZE)
else if (height > MAX_IMAGE_SHADOW_SIZE * 2)
shadow_height = MAX_IMAGE_SHADOW_SIZE;
else
- shadow_height = height * 0.5;
+ shadow_height = height * shadow_scaling_factor;
}
else {
if (height > MAX_IMAGE_SHADOW_SIZE)