Changeset 53887 in vbox
- Timestamp:
- Jan 21, 2015 5:02:11 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r53815 r53887 124 124 # define CR_RENDER_FORCE_PRESENT_MAIN_THREAD 125 125 # define SHOW_WINDOW_BACKGROUND 1 126 # define DEBUG_VERBOSE 126 # define DEBUG_VERBOSE 127 127 #endif 128 128 … … 133 133 # define DEBUG_WARN(text) do { LogRel(text); AssertFailed(); } while (0) 134 134 # 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) 137 137 # endif 138 138 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) 141 141 142 142 #else … … 1543 1543 if (m_fEverSized) 1544 1544 [self vboxReshapePerform]; 1545 1545 1546 1546 COCOA_LOG_FLOW(("%s: returns\n", __PRETTY_FUNCTION__)); 1547 1547 } … … 1689 1689 { 1690 1690 COCOA_LOG_FLOW(("%s: self=%p\n", __PRETTY_FUNCTION__, (void *)self)); 1691 1691 1692 1692 [self vboxReshapePerform]; 1693 1693 [self createDockTile]; … … 1727 1727 NSRect childFrame = NSZeroRect; 1728 1728 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 1730 1732 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)); 1732 1734 parentPos = parentFrame.origin; 1733 1735 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)); 1735 1737 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)); 1737 1739 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)); 1739 1741 parentFrame.origin = parentPos; 1740 1742 1741 1743 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)); 1743 1745 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)); 1745 1747 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)); 1747 1749 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)); 1749 1751 1750 1752 /* We have to make sure that the overlay window will not be displayed out … … 1753 1755 newFrame = NSIntersectionRect(parentFrame, childFrame); 1754 1756 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)); 1762 1764 1763 1765 /* Later we have to correct the texture position in the case the window is … … 1767 1769 m_RootRect.size = newFrame.size; 1768 1770 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)); 1787 1774 1788 1775 /* Set the new frame. */ … … 1798 1785 VBOX_CR_RENDER_CTX_INFO CtxInfo; 1799 1786 vboxCtxEnter(m_pSharedGLCtx, &CtxInfo); 1800 1787 1801 1788 [self updateViewportCS]; 1802 1789 1803 1790 vboxCtxLeave(&CtxInfo); 1804 1791 } … … 1813 1800 1814 1801 [self deleteDockTile]; 1815 1802 1816 1803 /* Is there a dock tile preview enabled in the GUI? If so setup a 1817 1804 * additional thumbnail view for the dock tile. */ … … 2869 2856 pGetGeometry->rect = [[pGetGeometry->pView window] frame]; 2870 2857 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)); 2872 2859 } 2873 2860
Note:
See TracChangeset
for help on using the changeset viewer.