remove dead code from SkPicturePlayback

This is from an earlier iteration of the pull-forward task before we switched to doing the majority of the work in SkGpuDevice.

R=jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/235473002

git-svn-id: http://skia.googlecode.com/svn/trunk@14162 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-04-11 19:05:22 +00:00
parent 461f227203
commit c3c67dfc73
2 changed files with 0 additions and 53 deletions

View File

@ -765,55 +765,6 @@ static DrawType read_op_and_size(SkReader32* reader, uint32_t* size) {
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 @@ void SkPicturePlayback::draw(SkCanvas& canvas, SkDrawPictureCallback* callback)
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();

View File

@ -115,8 +115,6 @@ protected:
virtual void postDraw(int opIndex);
#endif
void preLoadBitmaps(const SkTDArray<void*>* results);
private:
class TextContainer {
public: