/*** Mark the area defined by dirty as needing to be drawn. If the view is
* visible, {@link#onDraw(android.graphics.Canvas)} will be called at some
* point in the future.
*
* This must be called from a UI thread. To call from a non-UI thread, call
* {@link#postInvalidate()}.
*
* WARNING: In API 19 and below, this method may be destructive to
* {@codedirty}.
*
*@paramdirty the rectangle representing the bounds of the dirty region
*
*@deprecatedThe switch to hardware accelerated rendering in API 14 reduced
* the importance of the dirty rectangle. In API 21 the given rectangle is
* ignored entirely in favor of an internally-calculated area instead.
* Because of this, clients are encouraged to just call {@link#invalidate()}.*/@Deprecatedpublic voidinvalidate(Rect dirty) {final int scrollX =mScrollX;final int scrollY =mScrollY;
invalidateInternal(dirty.left- scrollX, dirty.top -scrollY,
dirty.right- scrollX, dirty.bottom - scrollY, true, false);
}/*** Mark the area defined by the rect (l,t,r,b) as needing to be drawn. The
* coordinates of the dirty rect are relative to the view. If the view is
* visible, {@link#onDraw(android.graphics.Canvas)} will be called at some
* point in the future.
*
* This must be called from a UI thread. To call from a non-UI thread, call
* {@link#postInvalidate()}.
*
*@paraml the left position of the dirty region
*@paramt the top position of the dirty region
*@paramr the right position of the dirty region
*@paramb the bottom position of the dirty region
*
*@deprecatedThe switch to hardware accelerated rendering in API 14 reduced
* the importance of the dirty rectangle. In API 21 the given rectangle is
* ignored entirely in favor of an internally-calculated area instead.
* Because of this, clients are encouraged to just call {@link#invalidate()}.*/@Deprecatedpublic void invalidate(int l, int t, int r, intb) {final int scrollX =mScrollX;final int scrollY =mScrollY;
invalidateInternal(l- scrollX, t - scrollY, r - scrollX, b - scrollY, true, false);
}