Is it safe to draw part of an Android bitmap onto itself with some overlap?
<p>I tested this on my Motorola Droid, and it worked as intended.  However, I'm concerned that this might be:</p>

<ol>
<li>Terribly inefficient.</li>
<li>Not guaranteed to work on all Android phones.</li>
</ol>

<p>Code:</p>

<pre><code>/* Create a simple 100 by 100 bitmap */
Bitmap myBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);

/* Create a canvas with which to draw on my bitmap */
Canvas myCanvas = new Canvas(myBitmap);

/* Draw a subset of my bitmap onto itself, with the source rectangle and destination rectangle overlapping */
Rect sourceRect = new Rect(10, 0, 99, 99);
Rect destRect = new Rect(0, 0, 89, 99);
myCanvas.drawBitmap(myBitmap, sourceRect, destRect, null);
</code></pre>

<p>As I said, this seemed to work fine in my testing, but when performing bit blits on other platforms, I haven't always been able to guarantee that it's safe, memory and performance-wise, to copy one grpahics region to another when the source and destinations intersect.</p>

<p>I'd welcome any insight into this.</p>
