aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 19:05:22 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-11 19:05:22 +0000
commitc3c67dfc73519910f173bd7b4da01b8583040096 (patch)
tree9be4182b7f4e4edc4497878bef49da29f8657cf4 /src
parent461f22720388005f51645f4ef43093c256dfee7c (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPicturePlayback.cpp51
-rw-r--r--src/core/SkPicturePlayback.h2
2 files changed, 0 insertions, 53 deletions
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 61a5b62ebf..a942338f17 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -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();
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 5fc52aeb9c..4a7ca31c47 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -115,8 +115,6 @@ protected:
virtual void postDraw(int opIndex);
#endif
- void preLoadBitmaps(const SkTDArray<void*>* results);
-
private:
class TextContainer {
public: