Bugzilla – Attachment 63671 Details for
Bug 117163
Minimizing a window takes 1-2 seconds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
big-fill.c
big-fill.c (text/plain), 1.59 KB, created by
Federico Mena Quintero
on 2006-01-17 18:12:30 UTC
(
hide
)
Description:
big-fill.c
Filename:
MIME Type:
Creator:
Federico Mena Quintero
Created:
2006-01-17 18:12:30 UTC
Size:
1.59 KB
patch
obsolete
>#include <stdio.h> >#include <sys/time.h> >#include <X11/Xlib.h> >#include <cairo-xlib.h> > >int >main (int argc, char **argv) >{ > Display *display; > Window root; > int screen; > Pixmap back_pixmap; > Pixmap temp_pixmap; > Visual *visual; > cairo_surface_t *back_surface, *temp_surface; > cairo_t *cr; > cairo_pattern_t *pattern; > struct timeval start, end, elapsed; > double total; > > display = XOpenDisplay (NULL); > XSynchronize (display, 1); > > screen = DefaultScreen (display); > root = DefaultRootWindow (display); > > back_pixmap = XCreatePixmap (display, root, 1400, 1050, DefaultDepth (display, screen)); /* desktop background */ > temp_pixmap = XCreatePixmap (display, root, 1400, 1021, DefaultDepth (display, screen)); /* double-buffer */ > > visual = DefaultVisual (display, screen); > back_surface = cairo_xlib_surface_create (display, back_pixmap, visual, 1400, 1050); > temp_surface = cairo_xlib_surface_create (display, temp_pixmap, visual, 1400, 1021); > > cr = cairo_create (temp_surface); > > pattern = cairo_pattern_create_for_surface (back_surface); > cairo_surface_destroy (back_surface); > > cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT); > cairo_set_source (cr, pattern); > cairo_pattern_destroy (pattern); > > cairo_rectangle (cr, 0, 0, 1400, 1021); > > gettimeofday (&start, NULL); > cairo_fill (cr); > gettimeofday (&end, NULL); > > if (start.tv_usec > end.tv_usec) { > end.tv_usec += 1000000; > end.tv_sec--; > } > > elapsed.tv_usec = end.tv_usec - start.tv_usec; > elapsed.tv_sec = end.tv_sec - start.tv_sec; > > total = elapsed.tv_sec + ((double) elapsed.tv_usec / 1e6); > > printf ("cairo_fill() time: %f sec\n", total); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 117163
:
50106
| 63671 |
65931
|
65960
|
66232
|
66252
|
66427