If you #define SK_ALLOW_OVER_32K_BITMAPS, then skia will try to draw bitmaps

whose dimensions exceed 32K. In my testing, this is fine, but I'm coding this
as an opt-in feature for now, to allow for more testing before its enabled
by default.



git-svn-id: http://skia.googlecode.com/svn/trunk@693 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-01-13 18:30:42 +00:00
Родитель d3b13bd5af
Коммит a76de3d1a9
2 изменённых файлов: 120 добавлений и 115 удалений

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

@ -818,8 +818,11 @@ void SkCanvas::restoreToCount(int count) {
// can't draw it if its empty, or its too big for a fixed-point width or height
static bool reject_bitmap(const SkBitmap& bitmap) {
return bitmap.width() <= 0 || bitmap.height() <= 0 ||
bitmap.width() > 32767 || bitmap.height() > 32767;
return bitmap.width() <= 0 || bitmap.height() <= 0
#ifndef SK_ALLOW_OVER_32K_BITMAPS
|| bitmap.width() > 32767 || bitmap.height() > 32767
#endif
;
}
void SkCanvas::internalDrawBitmap(const SkBitmap& bitmap, const SkIRect* srcRect,

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

@ -1053,10 +1053,12 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix,
return;
}
#ifndef SK_ALLOW_OVER_32K_BITMAPS
// run away on too-big bitmaps for now (exceed 16.16)
if (bitmap.width() > 32767 || bitmap.height() > 32767) {
return;
}
#endif
SkAutoPaintStyleRestore restore(paint, SkPaint::kFill_Style);