Sometimes they’re the same.
The API documentation says:
Size getVisibleSize() const
returns visible size of the OpenGL view in points.
the value is equal to getWinSize if don't invoke EGLView::setDesignResolutionSize()
const Size& getWinSize() const
returns the size of the OpenGL view in points.
If you didn’t use EGLView::setDesignResolutionSize(), either of them is okay.
But as their names said, getVisibleSize() returns the visible size, and getWinSize() returns the OpenGL view size. In windows, the size of the OpenGL view is the window size.
For example, in Windows 7, we can see a border around the Cocos2d-x window. This is not in the visible size, but it’s in the window size.
So if you want to get the size which the player can see, please use getVisibleSize.
Hope this can help you!