VirtualBox

Changeset 53887 in vbox


Ignore:
Timestamp:
Jan 21, 2015 5:02:11 AM (10 years ago)
Author:
vboxsync
Message:

Host 3D: adjust renderer logging for Cocoa backend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m

    r53815 r53887  
    124124# define CR_RENDER_FORCE_PRESENT_MAIN_THREAD
    125125# define SHOW_WINDOW_BACKGROUND 1
    126 # define DEBUG_VERBOSE     
     126# define DEBUG_VERBOSE
    127127#endif
    128128
     
    133133#  define DEBUG_WARN(text) do { LogRel(text); AssertFailed(); } while (0)
    134134# else
    135 #  define DEBUG_INFO(text) do { crWarning text; AssertFailed(); } while (0)
    136 #  define DEBUG_WARN(text) do { crWarning text; AssertFailed(); } while (0)
     135#  define DEBUG_INFO(text) do { LogRel(text); AssertFailed(); } while (0)
     136#  define DEBUG_WARN(text) do { LogRel(text); AssertFailed(); } while (0)
    137137# endif
    138138
    139 # define DEBUG_MSG(text)   do { printf text; } while (0)
    140 # define DEBUG_MSG_1(text) do { printf text; } while (0)
     139# define DEBUG_MSG(text)   do { LogRel(text); } while (0)
     140# define DEBUG_MSG_1(text) do { LogRel(text); } while (0)
    141141
    142142#else
     
    15431543    if (m_fEverSized)
    15441544        [self vboxReshapePerform];
    1545        
     1545
    15461546    COCOA_LOG_FLOW(("%s: returns\n", __PRETTY_FUNCTION__));
    15471547}
     
    16891689{
    16901690    COCOA_LOG_FLOW(("%s: self=%p\n", __PRETTY_FUNCTION__, (void *)self));
    1691    
     1691
    16921692    [self vboxReshapePerform];
    16931693    [self createDockTile];
     
    17271727    NSRect childFrame  = NSZeroRect;
    17281728    NSRect newFrame    = NSZeroRect;
    1729    
     1729
     1730    DEBUG_MSG(("vboxReshapePerform: m_Pos=[%d, %d], m_Size=[%dx%d]\n", (int)m_Pos.x, (int)m_Pos.y, (int)m_Size.width, (int)m_Size.height));
     1731
    17301732    parentFrame = [m_pParentView frame];
    1731     DEBUG_MSG(("FIXED parentFrame [%f:%f], [%f:%f]\n", parentFrame.origin.x, parentFrame.origin.y, parentFrame.size.width, parentFrame.size.height));   
     1733    DEBUG_MSG(("vboxReshapePerform: FIXED parentFrame [%d:%d], [%d:%d]\n", (int)parentFrame.origin.x, (int)parentFrame.origin.y, (int)parentFrame.size.width, (int)parentFrame.size.height));
    17321734    parentPos = parentFrame.origin;
    17331735    parentPos.y += parentFrame.size.height;
    1734     DEBUG_MSG(("FIXED(view) parentPos [%f:%f]\n", parentPos.x, parentPos.y));
     1736    DEBUG_MSG(("vboxReshapePerform: FIXED(view) parentPos [%d:%d]\n", (int)parentPos.x, (int)parentPos.y));
    17351737    parentPos = [m_pParentView convertPoint:parentPos toView:nil];
    1736     DEBUG_MSG(("FIXED parentPos(win) [%f:%f]\n", parentPos.x, parentPos.y));
     1738    DEBUG_MSG(("vboxReshapePerform: FIXED parentPos(win) [%d:%d]\n", (int)parentPos.x, (int)parentPos.y));
    17371739    parentPos = [[m_pParentView window] convertBaseToScreen:parentPos];
    1738     DEBUG_MSG(("FIXED parentPos(screen) [%f:%f]\n", parentPos.x, parentPos.y));
     1740    DEBUG_MSG(("vboxReshapePerform: FIXED parentPos(screen) [%d:%d]\n", (int)parentPos.x, (int)parentPos.y));
    17391741    parentFrame.origin = parentPos;
    1740    
     1742
    17411743    childPos = NSMakePoint(m_Pos.x, m_Pos.y + m_Size.height);
    1742     DEBUG_MSG(("FIXED(view) childPos [%f:%f]\n", childPos.x, childPos.y));
     1744    DEBUG_MSG(("vboxReshapePerform: FIXED(view) childPos [%d:%d]\n", (int)childPos.x, (int)childPos.y));
    17431745    childPos = [m_pParentView convertPoint:childPos toView:nil];
    1744     DEBUG_MSG(("FIXED(win) childPos [%f:%f]\n", childPos.x, childPos.y));
     1746    DEBUG_MSG(("vboxReshapePerform: FIXED(win) childPos [%d:%d]\n", (int)childPos.x, (int)childPos.y));
    17451747    childPos = [[m_pParentView window] convertBaseToScreen:childPos];
    1746     DEBUG_MSG(("FIXED childPos(screen) [%f:%f]\n", childPos.x, childPos.y));
     1748    DEBUG_MSG(("vboxReshapePerform: FIXED childPos(screen) [%d:%d]\n", (int)childPos.x, (int)childPos.y));
    17471749    childFrame = NSMakeRect(childPos.x, childPos.y, m_Size.width, m_Size.height);
    1748     DEBUG_MSG(("FIXED childFrame [%f:%f], [%f:%f]\n", childFrame.origin.x, childFrame.origin.y, childFrame.size.width, childFrame.size.height));       
     1750    DEBUG_MSG(("vboxReshapePerform: FIXED childFrame [%d:%d], [%d:%d]\n", (int)childFrame.origin.x, (int)childFrame.origin.y, (int)childFrame.size.width, (int)childFrame.size.height));
    17491751
    17501752    /* We have to make sure that the overlay window will not be displayed out
     
    17531755    newFrame = NSIntersectionRect(parentFrame, childFrame);
    17541756
    1755     DEBUG_MSG(("[%#p]: parentFrame pos[%f : %f] size[%f : %f]\n",
    1756                (void *)self, parentFrame.origin.x, parentFrame.origin.y, parentFrame.size.width, parentFrame.size.height));
    1757     DEBUG_MSG(("[%#p]: childFrame pos[%f : %f] size[%f : %f]\n",
    1758                (void *)self, childFrame.origin.x, childFrame.origin.y, childFrame.size.width, childFrame.size.height));
    1759          
    1760     DEBUG_MSG(("[%#p]: newFrame pos[%f : %f] size[%f : %f]\n",
    1761                (void *)self, newFrame.origin.x, newFrame.origin.y, newFrame.size.width, newFrame.size.height));
     1757    DEBUG_MSG(("vboxReshapePerform: [%#p]: parentFrame pos[%d : %d] size[%d : %d]\n",
     1758               (void *)self, (int)parentFrame.origin.x, (int)parentFrame.origin.y, (int)parentFrame.size.width, (int)parentFrame.size.height));
     1759    DEBUG_MSG(("vboxReshapePerform: [%#p]: childFrame pos[%d : %d] size[%d : %d]\n",
     1760               (void *)self, (int)childFrame.origin.x, (int)childFrame.origin.y, (int)childFrame.size.width, (int)childFrame.size.height));
     1761
     1762    DEBUG_MSG(("vboxReshapePerform: [%#p]: newFrame pos[%d : %d] size[%d : %d]\n",
     1763               (void *)self, (int)newFrame.origin.x, (int)newFrame.origin.y, (int)newFrame.size.width, (int)newFrame.size.height));
    17621764
    17631765    /* Later we have to correct the texture position in the case the window is
     
    17671769    m_RootRect.size = newFrame.size;
    17681770    m_yInvRootOffset = newFrame.origin.y - childFrame.origin.y;
    1769    
    1770     DEBUG_MSG(("[%#p]: m_RootRect pos[%f : %f] size[%f : %f]\n",
    1771                (void *)self, m_RootRect.origin.x, m_RootRect.origin.y, m_RootRect.size.width, m_RootRect.size.height));
    1772    
    1773        
    1774     /*
    1775     NSScrollView *pScrollView = [[[m_pParentView window] contentView] enclosingScrollView];
    1776     if (pScrollView)
    1777     {
    1778         NSRect scrollRect = [pScrollView documentVisibleRect];
    1779         NSRect scrollRect = [m_pParentView visibleRect];
    1780         printf ("sc rect: %d %d %d %d\n", (int) scrollRect.origin.x,(int) scrollRect.origin.y,(int) scrollRect.size.width,(int) scrollRect.size.height);
    1781         NSRect b = [[m_pParentView superview] bounds];
    1782         printf ("bound rect: %d %d %d %d\n", (int) b.origin.x,(int) b.origin.y,(int) b.size.width,(int) b.size.height);
    1783         newFrame.origin.x += scrollRect.origin.x;
    1784         newFrame.origin.y += scrollRect.origin.y;
    1785     }
    1786     */
     1771
     1772    DEBUG_MSG(("vboxReshapePerform: [%#p]: m_RootRect pos[%d : %d] size[%d : %d]\n",
     1773               (void *)self, (int)m_RootRect.origin.x, (int)m_RootRect.origin.y, (int)m_RootRect.size.width, (int)m_RootRect.size.height));
    17871774
    17881775    /* Set the new frame. */
     
    17981785        VBOX_CR_RENDER_CTX_INFO CtxInfo;
    17991786        vboxCtxEnter(m_pSharedGLCtx, &CtxInfo);
    1800    
     1787
    18011788        [self updateViewportCS];
    1802    
     1789
    18031790        vboxCtxLeave(&CtxInfo);
    18041791    }
     
    18131800
    18141801    [self deleteDockTile];
    1815        
     1802
    18161803    /* Is there a dock tile preview enabled in the GUI? If so setup a
    18171804     * additional thumbnail view for the dock tile. */
     
    28692856    pGetGeometry->rect = [[pGetGeometry->pView window] frame];
    28702857    COCOA_LOG_FLOW(("vboxRcdGetGeomerty: (x,y)=(%d,%d) (cx,cy)=(%d,%d)\n", pGetGeometry->rect.origin.x, pGetGeometry->rect.origin.y,
    2871                     pGetGeometry->rect.size.width, pGetGeometry->rect.heigth));
     2858                    pGetGeometry->rect.size.width, pGetGeometry->rect.size.height));
    28722859}
    28732860
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette