Bug 715894 - Only draw dirty rect when using gralloc textures r=clord

--HG--
extra : rebase_source : 432da0c53ce697b6bbc8009c615e9bfb81f0778f
This commit is contained in:
James Willcox 2012-01-06 12:25:05 -05:00
Родитель 8cf829b9d9
Коммит caa76a7c3f
1 изменённых файлов: 3 добавлений и 8 удалений

Просмотреть файл

@ -1203,7 +1203,7 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
sDirectTexture->Reallocate(gAndroidBounds.width, gAndroidBounds.height);
}
sDirectTexture->Lock(AndroidGraphicBuffer::UsageSoftwareWrite, &bits);
sDirectTexture->Lock(AndroidGraphicBuffer::UsageSoftwareWrite, ae->Rect(), &bits);
} else {
bits = client.LockBufferBits();
}
@ -1235,13 +1235,8 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
drawSuccess = false;
break;
} else {
if (sHasDirectTexture) {
// XXX: lock only the dirty rect above and pass it in here
DrawTo(targetSurface);
} else {
targetSurface->SetDeviceOffset(gfxPoint(-x, -y));
DrawTo(targetSurface, ae->Rect());
}
targetSurface->SetDeviceOffset(gfxPoint(-x, -y));
DrawTo(targetSurface, ae->Rect());
}
}
}