Work around stack overflow

Review URL: https://codereview.appspot.com/7561043

git-svn-id: http://skia.googlecode.com/svn/trunk@8162 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
vandebo@chromium.org 2013-03-14 17:24:16 +00:00
parent 996d78b7cf
commit 8d8d9a5606
2 changed files with 2 additions and 4 deletions

View File

@ -139,8 +139,10 @@ protected:
SkRect rect = SkRect::MakeXYWH(x * kRectWidth, y * kRectHeight,
SkIntToScalar(kRectWidth),
SkIntToScalar(kRectHeight));
canvas->saveLayer(&rect, NULL);
canvas->drawRect(rect, bgPaint);
canvas->drawRect(rect, paint);
canvas->restore();
++idx;
}
}

View File

@ -26,10 +26,6 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) {
// If there is an issue, getResources will end up consuming all memory.
// TODO: A better approach might be for all SkPDFObject to keep track
// of possible cycles.
#ifdef SK_DEBUG
SkTDArray<SkPDFObject*> dummy_resourceList;
getResources(&dummy_resourceList);
#endif
SkAutoTUnref<SkStream> content(device->content());
setData(content.get());