Kusal Mendis and Dhananjaya de Silva piled on the runs to put Sri Lanka in a comfortable position on the third day of the first Test against Bangladesh in Chittagong on Friday.