Definition at line 101 of file TableViewCache.h. References Impala::Application::VideoExcel::ImageCache::GetImageFromCache(), GetViewFromCache(), ILOG_ERROR, Impala::Application::VideoExcel::ImageCache::IsLoadingImages(), Impala::Application::VideoExcel::ImageCache::LoadImage(), mDelayedLoadQueue, mImageCache, mSource, Impala::Application::VideoExcel::TableDataSource::OutOfBoundsByID(), and SetViewUserData(). Referenced by Impala::Application::VideoExcel::TableColumn::DisplayFunc(), and Impala::Application::VideoExcel::GridWindow::DisplayFunc(). 00102 { 00103 if (mDelayedLoadQueue.empty()) 00104 { 00105 if (mImageCache->IsLoadingImages()) 00106 return true; 00107 else 00108 return false; 00109 } 00110 00111 OGLVIEW* v; 00112 for (int batch=0; batch < 45; batch++) 00113 { 00114 if (mDelayedLoadQueue.empty()) 00115 return true; 00116 std::pair <int, String> cell = mDelayedLoadQueue.front(); 00117 mDelayedLoadQueue.pop(); 00118 int id = cell.first; 00119 while (mSource->OutOfBoundsByID(id)) 00120 { 00121 //ILOG_DEBUG("Delayed loading of " << row << 00122 // " cancelled. Out of screen area."); 00123 00124 // if cashed unhook v, to be requeued again when visible. 00125 if (v = GetViewFromCache(id)) 00126 SetViewUserData(v, -1, 0); 00127 if (mDelayedLoadQueue.empty()) 00128 return true; 00129 cell = mDelayedLoadQueue.front(); 00130 mDelayedLoadQueue.pop(); 00131 id = cell.first; 00132 } 00133 //ILOG_DEBUG("Delayed loading of " << row << ", " << 00134 // "mDelayedLoadQueue.size() << " items remaining."); 00135 if (!(v = GetViewFromCache(id))) 00136 { 00137 ILOG_ERROR("ID " << id << " was added to the queue, " << 00138 "but its view got stolen!"); 00139 continue; 00140 } 00141 SetViewUserData(v, id, 0); 00142 00143 String column = cell.second; 00144 OGLIMAGE* oglIm = mImageCache->GetImageFromCache(id, column); 00145 00146 if (oglIm == 0) 00147 { 00148 oglIm = mImageCache->LoadImage(id, column); 00149 // batch+=2; // don't process too many pictures per DelayLoad 00150 } 00151 if (oglIm == 0) 00152 continue; 00153 viewSys.SetImage(v, oglIm); 00154 } 00155 return true; 00156 }
Here is the call graph for this function:
|