X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=render%2Ftest.c;h=36c962daf657567def152d81431655052c100652;hb=74a746e55f8c7faea0d71e9744532bda462b23bd;hp=6cf41c1bd1a7c05d2e0254a8577a130a75612726;hpb=2442cdfd85e5229c7ee4ac49ca66a7d55ffcb919;p=chaz%2Fopenbox diff --git a/render/test.c b/render/test.c index 6cf41c1b..36c962da 100644 --- a/render/test.c +++ b/render/test.c @@ -44,6 +44,7 @@ gint main() Window win; RrInstance *inst; RrAppearance *look; + int done; Window root; XEvent report; @@ -55,7 +56,7 @@ gint main() ob_root = RootWindow(ob_display, ob_screen); win = XCreateWindow(ob_display, RootWindow(ob_display, 0), - 10, 10, w, h, 10, + 10, 10, w, h, 10, CopyFromParent, /* depth */ CopyFromParent, /* class */ CopyFromParent, /* visual */ @@ -67,8 +68,10 @@ gint main() inst = RrInstanceNew(ob_display, ob_screen); look = RrAppearanceNew(inst, 0); - look->surface.grad = RR_SURFACE_PYRAMID; + look->surface.grad = RR_SURFACE_MIRROR_HORIZONTAL; look->surface.secondary = RrColorParse(inst, "Yellow"); + look->surface.split_secondary = RrColorParse(inst, "Red"); + look->surface.split_primary = RrColorParse(inst, "Green"); look->surface.primary = RrColorParse(inst, "Blue"); look->surface.interlaced = FALSE; if (ob_display == NULL) { @@ -76,8 +79,21 @@ gint main() return 0; } +#if BIGTEST + int i; + look->surface.pixel_data = g_new(RrPixel32, w*h); + for (i = 0; i < 10000; ++i) { + printf("\r%d", i); + fflush(stdout); + RrRender(look, w, h); + } + exit (0); +#endif + + RrPaint(look, win, w, h); - while (1) { + done = 0; + while (!done) { XNextEvent(ob_display, &report); switch (report.type) { case Expose: @@ -87,8 +103,10 @@ gint main() report.xconfigure.width, report.xconfigure.height); break; + case UnmapNotify: + done = 1; + break; } - } RrAppearanceFree (look);