moved translate_direct_copy function from PNGTranslator to BaseTranslator
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6841 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d02fdb8eb5
commit
c36e6575c8
@ -278,18 +278,6 @@ PNGTranslator::DerivedIdentify(BPositionIO *inSource,
|
||||
return identify_png_header(inSource, outInfo);
|
||||
}
|
||||
|
||||
void
|
||||
translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination)
|
||||
{
|
||||
const size_t kbufsize = 2048;
|
||||
uint8 buffer[kbufsize];
|
||||
ssize_t ret = inSource->Read(buffer, kbufsize);
|
||||
while (ret > 0) {
|
||||
outDestination->Write(buffer, ret);
|
||||
ret = inSource->Read(buffer, kbufsize);
|
||||
}
|
||||
}
|
||||
|
||||
status_t
|
||||
PNGTranslator::translate_from_png_to_bits(BPositionIO *inSource,
|
||||
BPositionIO *outDestination)
|
||||
|
@ -685,3 +685,14 @@ BaseTranslator::NewConfigView(TranslatorSettings *settings)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination)
|
||||
{
|
||||
const size_t kbufsize = 2048;
|
||||
uint8 buffer[kbufsize];
|
||||
ssize_t ret = inSource->Read(buffer, kbufsize);
|
||||
while (ret > 0) {
|
||||
outDestination->Write(buffer, ret);
|
||||
ret = inSource->Read(buffer, kbufsize);
|
||||
}
|
||||
}
|
||||
|
@ -150,5 +150,7 @@ private:
|
||||
uint32 fTranType;
|
||||
};
|
||||
|
||||
void translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination);
|
||||
|
||||
#endif // #ifndef BASE_TRANSLATOR_H
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user