Improved progress report, the update message now gets a proper "what" field.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20648 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-04-11 09:10:14 +00:00
parent 811c52c0e8
commit 5b91a7be30
2 changed files with 6 additions and 5 deletions

View File

@ -1510,7 +1510,7 @@ void
DCRaw::_AHDInterpolate()
{
if (fProgressMonitor != NULL)
fProgressMonitor("Interpolate", 30, fProgressData);
fProgressMonitor("Interpolate", 20, fProgressData);
#define TS 256 /* Tile Size */
@ -1532,8 +1532,8 @@ DCRaw::_AHDInterpolate()
rgb = (ushort(*)[TS][TS][3])buffer;
lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS);
homo = (char (*)[TS][TS])(buffer + 24*TS*TS);
float percentage = 30;
float percentageStep = 55.0f / (fInputHeight / (TS - 6));
float percentage = 20;
float percentageStep = 70.0f / (fInputHeight / (TS - 6));
for (top = 0; top < fInputHeight; top += TS - 6) {
if (fProgressMonitor) {
@ -1709,7 +1709,7 @@ void
DCRaw::_ConvertToRGB()
{
if (fProgressMonitor != NULL)
fProgressMonitor("Convert to RGB", 85, fProgressData);
fProgressMonitor("Convert to RGB", 90, fProgressData);
uint32 row, col, c, i, j, k;
float out[3], out_cam[3][4];

View File

@ -20,6 +20,7 @@ const char* kDocumentCount = "/documentCount";
const char* kDocumentIndex = "/documentIndex";
const char* kProgressMonitor = "/progressMonitor";
const uint32 kMsgProgressMonitorUpdate = 'SIup';
// The input formats that this translator supports.
translation_format sInputFormats[] = {
@ -148,7 +149,7 @@ RAWTranslator::_ProgressMonitor(const char* message, float percentage,
{
BMessenger& messenger = *(BMessenger*)data;
BMessage update;
BMessage update(kMsgProgressMonitorUpdate);
update.AddString("message", message);
update.AddFloat("percent", percentage);
update.AddInt64("time", system_time());