| Index: src/core/SkPicturePlayback.cpp
|
| ===================================================================
|
| --- src/core/SkPicturePlayback.cpp (revision 14155)
|
| +++ src/core/SkPicturePlayback.cpp (working copy)
|
| @@ -765,55 +765,6 @@
|
| return (DrawType) op;
|
| }
|
|
|
| -// The activeOps parameter is actually "const SkTDArray<SkPictureStateTree::Draw*>&".
|
| -// It represents the operations about to be drawn, as generated by some spatial
|
| -// subdivision helper class. It should already be in 'fOffset' sorted order.
|
| -void SkPicturePlayback::preLoadBitmaps(const SkTDArray<void*>* activeOps) {
|
| - if ((NULL != activeOps && 0 == activeOps->count()) || NULL == fBitmapUseOffsets) {
|
| - return;
|
| - }
|
| -
|
| - if (NULL == activeOps) {
|
| - // going to need everything
|
| - return;
|
| - }
|
| -
|
| - SkTDArray<int> active;
|
| -
|
| - SkAutoTDeleteArray<bool> needToCheck(new bool[fBitmapUseOffsets->numIDs()]);
|
| - for (int i = 0; i < fBitmapUseOffsets->numIDs(); ++i) {
|
| - needToCheck.get()[i] = true;
|
| - }
|
| -
|
| - uint32_t max = ((SkPictureStateTree::Draw*)(*activeOps)[(*activeOps).count()-1])->fOffset;
|
| -
|
| - for (int i = 0; i < activeOps->count(); ++i) {
|
| - SkPictureStateTree::Draw* draw = (SkPictureStateTree::Draw*) (*activeOps)[i];
|
| -
|
| - for (int j = 0; j < fBitmapUseOffsets->numIDs(); ++j) {
|
| - if (!needToCheck.get()[j]) {
|
| - continue;
|
| - }
|
| -
|
| - if (!fBitmapUseOffsets->overlap(j, draw->fOffset, max)) {
|
| - needToCheck.get()[j] = false;
|
| - continue;
|
| - }
|
| -
|
| - if (!fBitmapUseOffsets->includes(j, draw->fOffset)) {
|
| - continue;
|
| - }
|
| -
|
| - *active.append() = j;
|
| - needToCheck.get()[j] = false;
|
| - }
|
| - }
|
| -
|
| - for (int i = 0; i < active.count(); ++i) {
|
| - SkDebugf("preload texture %d\n", active[i]);
|
| - }
|
| -}
|
| -
|
| uint32_t SkPicturePlayback::CachedOperationList::offset(int index) const {
|
| SkASSERT(index < fOps.count());
|
| return ((SkPictureStateTree::Draw*)fOps[index])->fOffset;
|
| @@ -918,8 +869,6 @@
|
| reader.setOffset(skipTo);
|
| }
|
|
|
| - this->preLoadBitmaps(activeOps);
|
| -
|
| // Record this, so we can concat w/ it if we encounter a setMatrix()
|
| SkMatrix initialMatrix = canvas.getTotalMatrix();
|
| int originalSaveCount = canvas.getSaveCount();
|
|
|