diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index 49057589b0dd..8186ede960be 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -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()); } } }