[mutter] frames.c: Merge clear_backing() function into its only user
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames.c: Merge clear_backing() function into its only user
- Date: Sun, 26 Sep 2010 15:25:45 +0000 (UTC)
commit d212be799a41f43adf8c7dead84975fbf5630d3c
Author: Benjamin Otte <otte redhat com>
Date: Thu Sep 23 18:49:00 2010 +0200
frames.c: Merge clear_backing() function into its only user
Avoids creating a cairo_t twice. And without the code to create a
cairo_t, there was not a lot left to warrant a separate function.
https://bugzilla.gnome.org/show_bug.cgi?id=630203
src/ui/frames.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 2fdbbf8..ee90541 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -2081,20 +2081,6 @@ setup_bg_cr (cairo_t *cr, GdkWindow *window, int x_offset, int y_offset)
}
}
-static void
-clear_backing (GdkPixmap *pixmap,
- GdkWindow *window,
- int xoffset, int yoffset)
-{
- cairo_t *cr = gdk_cairo_create (pixmap);
-
- setup_bg_cr (cr, window, xoffset, yoffset);
-
- cairo_paint (cr);
-
- cairo_destroy (cr);
-}
-
/* Returns a pixmap with a piece of the windows frame painted on it.
*/
@@ -2113,10 +2099,11 @@ generate_pixmap (MetaFrames *frames,
result = gdk_pixmap_new (frame->window,
rect->width, rect->height, -1);
- clear_backing (result, frame->window, rect->x, rect->y);
-
cr = meta_cairo_create (result);
+ setup_bg_cr (cr, frame->window, rect->x, rect->y);
+ cairo_paint (cr);
+
meta_frames_paint (frames, frame, cr, -rect->x, -rect->y);
cairo_destroy (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]