The sloped top tube/compact geometry frame sizing normally uses the length of a horizontal line extended from the centerline of the head tube to a point on the centerline of the seatpost as the "effective" top tube length.
Here's Giant's table for comparing traditional geometry horizontal top tube frame sizes with compact geometry frames.
Here is a drawing showing the Giant Defy 3 geometry.
Frame size with traditional (horizontal top tube) geometry is usually the length of the seat tube measured from the center of the crank to either the intersection of the centerlines of the seat tube and top tube (center-to-center), or from the center of the crank to the top of the seat tube (center-to-top).