Bug 719136: Don't attempt to upload when there's nothing to upload. r=jrmuizel

This commit is contained in:
Bas Schouten 2012-01-31 06:15:23 +01:00
Родитель 0ba547cb7b
Коммит 614c2ee69d
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -1985,6 +1985,12 @@ DrawTargetD2D::CreatePartialBitmapForSurface(SourceSurfaceD2D *aSurface, Matrix
// surface. // surface.
uploadRect = uploadRect.Intersect(rect); uploadRect = uploadRect.Intersect(rect);
if (uploadRect.IsEmpty()) {
// This bitmap does not cover anything on the screen. XXX -
// we need to deal with EXTEND modes here!
return NULL;
}
if (uploadRect.width <= mRT->GetMaximumBitmapSize() && if (uploadRect.width <= mRT->GetMaximumBitmapSize() &&
uploadRect.height <= mRT->GetMaximumBitmapSize()) { uploadRect.height <= mRT->GetMaximumBitmapSize()) {