am 4c0a1705: don\'t generate a new Region when translating by 0,0

* commit '4c0a170585d5c8a1f3508ac55f799ebaf86e91db':
  don't generate a new Region when translating by 0,0
This commit is contained in:
Mathias Agopian 2012-08-31 18:45:29 -07:00 committed by Android Git Automerger
commit 5f86fd299b

View File

@ -529,7 +529,7 @@ void Region::boolean_operation(int op, Region& dst,
void Region::translate(Region& reg, int dx, int dy)
{
if (!reg.isEmpty()) {
if ((dx || dy) && !reg.isEmpty()) {
#if VALIDATE_REGIONS
validate(reg, "translate (before)");
#endif