The left-handed opener reached his second Test hundred in five matches when he cut fast bowler Ishant Sharma for his 13th four.
Skipper Mahela Jayawardene (66 not out) and Warnapura denied India success in the morning session with an unfinished 148-run stand for the third wicket after the hosts had resumed at 85-2.
Warnapura survived a leg-before appeal off spinner Harbhajan Singh when on 86 after India skipper Anil Kumble asked umpire Mark Benson of England to review the initial not-out decision under a new experimental rule.
Benson consulted TV umpire Rudi Koertzen of South Africa and was proved right.
The rule, on trial in the current three-Test series, allows players to seek a second opinion on umpiring decisions.
A batsman or fielding captain can request a review of any decision by referring it to the third official monitoring television replays.
Each team is allowed three unsuccessful review requests per innings and if one is successful it will get an additional appea