DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_area_task.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_area_task.h#9 $ */ 00010 /* $DateTime: 2008/10/23 16:21:38 $ */ 00011 /* $Change: 515804 $ */ 00012 /* $Author: stern $ */ 00013 00018 /*****************************************************************************/ 00019 00020 #ifndef __dng_area_task__ 00021 #define __dng_area_task__ 00022 00023 /*****************************************************************************/ 00024 00025 #include "dng_classes.h" 00026 #include "dng_point.h" 00027 #include "dng_types.h" 00028 00029 /*****************************************************************************/ 00030 00032 00033 class dng_area_task 00034 { 00035 00036 protected: 00037 00038 uint32 fMaxThreads; 00039 00040 uint32 fMinTaskArea; 00041 00042 dng_point fUnitCell; 00043 00044 dng_point fMaxTileSize; 00045 00046 public: 00047 00048 dng_area_task (); 00049 00050 virtual ~dng_area_task (); 00051 00055 00056 virtual uint32 MaxThreads () const 00057 { 00058 return fMaxThreads; 00059 } 00060 00067 00068 virtual uint32 MinTaskArea () const 00069 { 00070 return fMinTaskArea; 00071 } 00072 00078 00079 virtual dng_point UnitCell () const 00080 { 00081 return fUnitCell; 00082 } 00083 00089 00090 virtual dng_point MaxTileSize () const 00091 { 00092 return fMaxTileSize; 00093 } 00094 00102 00103 virtual dng_rect RepeatingTile1 () const; 00104 00112 00113 virtual dng_rect RepeatingTile2 () const; 00114 00122 00123 virtual dng_rect RepeatingTile3 () const; 00124 00132 00133 virtual void Start (uint32 threadCount, 00134 const dng_point &tileSize, 00135 dng_memory_allocator *allocator, 00136 dng_abort_sniffer *sniffer); 00137 00147 00148 virtual void Process (uint32 threadIndex, 00149 const dng_rect &tile, 00150 dng_abort_sniffer *sniffer) = 0; 00151 00156 00157 virtual void Finish (uint32 threadCount); 00158 00162 00163 dng_point FindTileSize (const dng_rect &area) const; 00164 00173 00174 void ProcessOnThread (uint32 threadIndex, 00175 const dng_rect &area, 00176 const dng_point &tileSize, 00177 dng_abort_sniffer *sniffer); 00178 00186 00187 static void Perform (dng_area_task &task, 00188 const dng_rect &area, 00189 dng_memory_allocator *allocator, 00190 dng_abort_sniffer *sniffer); 00191 00192 }; 00193 00194 /*****************************************************************************/ 00195 00196 #endif 00197 00198 /*****************************************************************************/ |