diff options
author | 2013-03-01 15:43:41 +0000 | |
---|---|---|
committer | 2013-03-01 15:43:41 +0000 | |
commit | cf5951036e963ab5b9b9d1ff1c1fd2ff01821d1b (patch) | |
tree | 28d50a1d31078f29f8eb5a6736440b385430a68b /src/core/SkPictureFlat.h | |
parent | ecd84842b3f65918eb040c53391172b6413fd7ad (diff) |
Revert r7918 & r7916 due to Linux rendering issues
git-svn-id: http://skia.googlecode.com/svn/trunk@7925 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkPictureFlat.h')
-rw-r--r-- | src/core/SkPictureFlat.h | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index a1367ec9a4..89b8e547e3 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -495,26 +495,6 @@ public: return array; } - /** - * Unflatten the specific object at the given index - */ - T* unflatten(int index) const { - // fData is sorted so it is necessary to search through it to find the - // SkFlatData with the specified index - // TODO: findAndReplace makes it a bit difficult but there must be - // a better way to perform this mapping - for (int i = 0; i < fData.count(); ++i) { - const SkFlatData* element = fData[i]; - if (index == element->index()) { - T* dst = new T; - this->unflatten(dst, element); - return dst; - } - } - - return NULL; - } - const SkFlatData* findAndReturnFlat(const T& element) { SkFlatData* flat = SkFlatData::Create(fController, &element, fNextIndex, fFlattenProc); @@ -548,12 +528,6 @@ protected: void (*fUnflattenProc)(SkOrderedReadBuffer&, void*); private: - void unflatten(T* dst, const SkFlatData* element) const { - element->unflatten(dst, fUnflattenProc, - fController->getBitmapHeap(), - fController->getTypefacePlayback()); - } - void unflattenIntoArray(T* array) const { const int count = fData.count(); const SkFlatData* const* iter = fData.begin(); @@ -561,7 +535,9 @@ private: const SkFlatData* element = iter[i]; int index = element->index() - 1; SkASSERT((unsigned)index < (unsigned)count); - unflatten(&array[index], element); + element->unflatten(&array[index], fUnflattenProc, + fController->getBitmapHeap(), + fController->getTypefacePlayback()); } } |