Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

bool Impala::Application::MediaTable::TableViewCache::ProcessDelayLoad (  )  [inline]

Definition at line 119 of file TableViewCache.h.

References OglGui::OglImageCache::Add(), OglGui::OglImageCache::GetImage(), OglGui::GetOglImageByIdInterface::GetOglImageById(), GetViewFromCache(), mDelayedLoadQueue, mGetOglImageByIdI, mOglImageCache, mSource, Impala::Application::MediaTable::TableDataView::OutOfBoundsByQuid(), and SetViewUserData().

Referenced by Impala::Application::MediaTable::TableWindowColumn::DisplayFunc(), Impala::Application::MediaTable::GridWindow::DisplayFunc(), Impala::Application::TagsLife::BarPlot::HandleViews(), and Impala::Application::MediaTable::BarPlot::HandleViews().

00120     {
00121         if (mDelayedLoadQueue.empty())
00122         {
00123                         ImageLoader* loader = dynamic_cast<ImageLoader*> (mGetOglImageByIdI);
00124                 if(loader)
00125                                 return loader->IsLoading();
00126                         else
00127                                 return false;
00128 
00129         }
00130 
00131         OGLVIEW* v;
00132         for (int batch=0; batch < 45; batch++)
00133         {
00134             if (mDelayedLoadQueue.empty())
00135                 return true;
00136             unsigned long long quid = mDelayedLoadQueue.front();
00137             mDelayedLoadQueue.pop();
00138                         if (mSource->OutOfBoundsByQuid(quid))
00139             {
00140                 //ILOG_DEBUG("Delayed loading of " << row <<
00141                 //           " cancelled. Out of screen area.");
00142 
00143                 // if cashed unhook v, to be requeued again when visible.
00144                 if (v = GetViewFromCache(quid))
00145                     SetViewUserData(v, -1, 0);
00146                 continue;
00147             }
00148             //ILOG_DEBUG("Delayed loading of " << row << ", " <<
00149             //           "mDelayedLoadQueue.size() << " items remaining.");
00150             if (!(v = GetViewFromCache(quid)))
00151             {
00152                 //ILOG_ERROR("QUID " << quid << " was added to the queue, " <<
00153                 //           "but its view got stolen!");
00154                 continue;
00155             }
00156             v->UserData2 = (void *) 0;
00157             OGLIMAGE* oglIm  = mOglImageCache->GetImage(quid);
00158 
00159             if ((oglIm == 0) && mGetOglImageByIdI)
00160             {
00161                 oglIm = mGetOglImageByIdI->GetOglImageById(quid);
00162                 mOglImageCache->Add(oglIm, quid);
00163 //                batch+=2; // don't process too many pictures per DelayLoad
00164             }
00165             if (oglIm == 0)
00166                 continue;
00167             viewSys.SetImage(v, oglIm);
00168                         ReleaseOglImage(oglIm);
00169         }
00170         return true;
00171     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:46:41 2010 for ImpalaSrc by  doxygen 1.5.1