diff options
author | Benjamin Otte <otte@redhat.com> | 2014-10-08 05:19:07 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-10-08 05:20:31 +0200 |
commit | a3d68af95053ca8072e27a5b7258018e7635788f (patch) | |
tree | fc7c63d1c20a09e94a026cffaa136962c95664b9 /gtk/gtkcsstypesprivate.h | |
parent | 14d166145a724bcffce4432fe72135e5d9212248 (diff) | |
download | gtk+-a3d68af95053ca8072e27a5b7258018e7635788f.tar.gz |
themingbackground: Add a quick exit for default case
In the case where the background is completely transparent, exit the
rendering functions before doing any expensive calculations.
Diffstat (limited to 'gtk/gtkcsstypesprivate.h')
-rw-r--r-- | gtk/gtkcsstypesprivate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkcsstypesprivate.h b/gtk/gtkcsstypesprivate.h index f3c319c3b3..314d3dd0ce 100644 --- a/gtk/gtkcsstypesprivate.h +++ b/gtk/gtkcsstypesprivate.h @@ -280,6 +280,9 @@ GtkCssChange _gtk_css_change_for_child (GtkCssChange GtkCssDependencies _gtk_css_dependencies_union (GtkCssDependencies first, GtkCssDependencies second); +/* for lack of better place to put it */ +/* mirror what cairo does */ +#define gtk_rgba_is_clear(rgba) ((rgba)->alpha < ((double)0x00ff / (double)0xffff)) G_END_DECLS |