From an incompletely scientific test, I drew raster images broken into a larger area than on the screen, I found that checking in advance if the bitmap was on the screen does not seem to be much different.
In one test, I set Rect to the screen size and set another Rect to the position of the bitmap and checked Rect.intersects () before drawing. In another test, I just drew a bitmap. After 300 draws there was no visible trend - some went one way, others went the other. I tried the 300 draw test every frame, and the change from frame to frame was much larger than the difference between the marked and unverified pattern.
From this, I find it safe to say that Android checks borders in its own code , or you expect a significant difference. I would share the code for my test, but I think it makes sense for you to make your own test in the context of your situation. Possible points behave differently than bitmaps, or some other feature of your paint or canvas changes the situation.
I hope that you will help you (or another, stumble upon this thread, as well as the same question).
source share