| Index: src/core/SkMultiPictureDraw.cpp
|
| diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp
|
| index ed099a02e16b741c2f9e108e9be2d2b8e356f392..c85c56735ccd64cfdfe20cfa7de3df7709c96ca4 100644
|
| --- a/src/core/SkMultiPictureDraw.cpp
|
| +++ b/src/core/SkMultiPictureDraw.cpp
|
| @@ -84,13 +84,22 @@ public:
|
| ~AutoMPDReset() { fMPD->reset(); }
|
| };
|
|
|
| +//#define FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING
|
| +
|
| void SkMultiPictureDraw::draw() {
|
| AutoMPDReset mpdreset(this);
|
| +
|
| +#ifdef FORCE_SINGLE_THREAD_DRAWING_FOR_TESTING
|
| + for (int i = 0; i < fThreadSafeDrawData.count(); ++i) {
|
| + DrawData* dd = &fThreadSafeDrawData.begin()[i];
|
| + dd->fCanvas->drawPicture(dd->fPicture, &dd->fMatrix, dd->fPaint);
|
| + }
|
| +#else
|
| // we place the taskgroup after the MPDReset, to ensure that we don't delete the DrawData
|
| // objects until after we're finished the tasks (which have pointers to the data).
|
| -
|
| SkTaskGroup group;
|
| group.batch(DrawData::Draw, fThreadSafeDrawData.begin(), fThreadSafeDrawData.count());
|
| +#endif
|
| // we deliberately don't call wait() here, since the destructor will do that, this allows us
|
| // to continue processing gpu-data without having to wait on the cpu tasks.
|
|
|
|
|