fix cacheAsBitmap alpha issue for canvas

fix issue #1009