Maintenance:
authorTon Roosendaal <ton@blender.org>
Mon, 28 Mar 2011 18:51:27 +0000 (18:51 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 28 Mar 2011 18:51:27 +0000 (18:51 +0000)
Gave the report-timer (in top header) an own TIMER define, to not
confuse with timers in use for UI. Easier for debugging. :)
Also gave better malloc names to regions in 3d window.

All this for testing proper buffer drawing in Intel cards... which
is still unsolved.

source/blender/editors/space_info/space_info.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/wm_event_types.h

index 0068e42ba19433bdb9fd0ff1554e411b40d929fc..bd2e8077eabd4852e73dca122c58ab5dc5e78e91 100644 (file)
@@ -198,7 +198,7 @@ static void info_keymap(struct wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0);
        
-       WM_keymap_verify_item(keymap, "INFO_OT_reports_display_update", TIMER, KM_ANY, KM_ANY, 0);
+       WM_keymap_verify_item(keymap, "INFO_OT_reports_display_update", TIMERREPORT, KM_ANY, KM_ANY, 0);
 
        /* info space */
        keymap= WM_keymap_find(keyconf, "Info", SPACE_INFO, 0);
index 5d75d6456950618682cf1799ac387dc42173883d..72d7977e1327ae1e0e59df6c1ddd038ba8cef5fc 100644 (file)
@@ -1078,7 +1078,7 @@ void ED_spacetype_view3d(void)
        st->context= view3d_context;
        
        /* regions: main window */
-       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d main region");
        art->regionid = RGN_TYPE_WINDOW;
        art->keymapflag= ED_KEYMAP_GPENCIL;
        art->draw= view3d_main_area_draw;
@@ -1091,7 +1091,7 @@ void ED_spacetype_view3d(void)
        BLI_addhead(&st->regiontypes, art);
        
        /* regions: listview/buttons */
-       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d buttons region");
        art->regionid = RGN_TYPE_UI;
        art->prefsizex= 180; // XXX
        art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
@@ -1103,7 +1103,7 @@ void ED_spacetype_view3d(void)
        view3d_buttons_register(art);
 
        /* regions: tool(bar) */
-       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d tools region");
        art->regionid = RGN_TYPE_TOOLS;
        art->prefsizex= 160; // XXX
        art->prefsizey= 50; // XXX
@@ -1119,7 +1119,7 @@ void ED_spacetype_view3d(void)
 #endif
 
        /* regions: tool properties */
-       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d tool properties region");
        art->regionid = RGN_TYPE_TOOL_PROPS;
        art->prefsizex= 0;
        art->prefsizey= 120;
@@ -1133,7 +1133,7 @@ void ED_spacetype_view3d(void)
        
        
        /* regions: header */
-       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
+       art= MEM_callocN(sizeof(ARegionType), "spacetype view3d header region");
        art->regionid = RGN_TYPE_HEADER;
        art->prefsizey= HEADERY;
        art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
index 8dcd3fa34d17326cf4cfe8edfc5b8aa1e31d5867..b52e8e92f2229c1b2baaf93112ad063f09c05d99 100644 (file)
@@ -469,7 +469,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop
                WM_event_remove_timer(wm, NULL, wm_reports->reporttimer);
                
                /* Records time since last report was added */
-               wm_reports->reporttimer= WM_event_add_timer(wm, CTX_wm_window(C), TIMER, 0.05);
+               wm_reports->reporttimer= WM_event_add_timer(wm, CTX_wm_window(C), TIMERREPORT, 0.05);
                
                rti = MEM_callocN(sizeof(ReportTimerInfo), "ReportTimerInfo");
                wm_reports->reporttimer->customdata = rti;
index 39545a0ad01e26a354cdb395c2d3d8499a0f6302..ee080e7c0aadefa83be00f168e84e6e8f7591602 100644 (file)
 #define TIMER0                 0x0111  /* timer event, slot for internal use */
 #define TIMER1                 0x0112  /* timer event, slot for internal use */
 #define TIMER2                 0x0113  /* timer event, slot for internal use */
-#define TIMERJOBS              0x0114  /* timer event, internal use */
-#define TIMERAUTOSAVE  0x0115  /* timer event, internal use */
+#define TIMERJOBS              0x0114  /* timer event, jobs system */
+#define TIMERAUTOSAVE  0x0115  /* timer event, autosave */
+#define TIMERREPORT            0x0116  /* timer event, reports */
+#define TIMERF                 0x011F  /* last timer */
+
+/* test whether the event is timer event */
+#define ISTIMER(event) (event >= TIMER && event <= TIMERF)
+
 
 /* standard keyboard */
 #define AKEY           'a'
        /* test whether the event is a mouse button */
 #define ISMOUSE(event) (event >= LEFTMOUSE && event <= MOUSEROTATE)
 
-       /* test whether the event is timer event */
-#define ISTIMER(event) (event >= TIMER && event <= TIMERAUTOSAVE)
-
        /* test whether the event is tweak event */
 #define ISTWEAK(event) (event >= EVT_TWEAK_L && event <= EVT_GESTURE)