Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 235473002: remove dead code from SkPicturePlayback (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPicturePlayback.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/core/SkPicturePlayback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698