From cf5951036e963ab5b9b9d1ff1c1fd2ff01821d1b Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Fri, 1 Mar 2013 15:43:41 +0000 Subject: Revert r7918 & r7916 due to Linux rendering issues git-svn-id: http://skia.googlecode.com/svn/trunk@7925 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkPictureFlat.h | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'src/core/SkPictureFlat.h') 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()); } } -- cgit v1.2.3