Top seed Novak Djokovic opened his Wimbledon campaign with a straight-sets victory over Florian Mayer.