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

OGLIMAGE* Impala::Application::VideoExcel::ImageCache::LoadImage ( int  id,
String  column 
) [inline]

Definition at line 124 of file ImageCache.h.

References Impala::Application::VideoExcel::TableDataSource::GetImageDataByID(), GetLeastUsedImageFromCache(), ILOG_DEBUG, mSource, and Impala::Visualization::RgbOglImage::OglImage().

Referenced by GetImage(), PreloadCache(), and Impala::Application::VideoExcel::TableViewCache::ProcessDelayLoad().

00125     {
00126         // image not in cache, load and place in cache:
00127         // ILOG_DEBUG("cache miss: retrieving " << id << "...");
00128         Array2dVec3UInt8* ar = mSource->GetImageDataByID(column, id);
00129         if (ar == 0)
00130             return 0;
00131 
00132         ImageWithID *p = GetLeastUsedImageFromCache();
00133         if (p->second)
00134         {
00135             ReleaseOglImage(p->second);
00136             ILOG_DEBUG("Refcount for least used image now " <<
00137                        p->second->refCount);
00138         }
00139         else
00140             ILOG_DEBUG("Cache not yet grown to max size, growing...");
00141 
00142         p->second = Visualization::RgbOglImage::OglImage(ar);
00143         p->first = id;
00144         return p->second;
00145     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:39 2011 for ImpalaSrc by  doxygen 1.5.1