- moved more code from DCanvas to DFrameBuffer.
This commit is contained in:
parent
d650e37497
commit
ded21cba8e
6 changed files with 13 additions and 909 deletions
|
|
@ -235,38 +235,6 @@ bool DCanvas::IsValid ()
|
|||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DCanvas :: GetScreenshotBuffer
|
||||
//
|
||||
// Returns a buffer containing the most recently displayed frame. The
|
||||
// width and height of this buffer are the same as the canvas.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DCanvas::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch, ESSType &color_type, float &gamma)
|
||||
{
|
||||
Lock(true);
|
||||
buffer = GetBuffer();
|
||||
pitch = IsBgra() ? GetPitch() * 4 : GetPitch();
|
||||
color_type = IsBgra() ? SS_BGRA : SS_PAL;
|
||||
gamma = Gamma;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// DCanvas :: ReleaseScreenshotBuffer
|
||||
//
|
||||
// Releases the buffer obtained through GetScreenshotBuffer. These calls
|
||||
// must not be nested.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void DCanvas::ReleaseScreenshotBuffer()
|
||||
{
|
||||
Unlock();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// V_GetColorFromString
|
||||
|
|
@ -553,7 +521,7 @@ static void BuildTransTable (const PalEntry *palette)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DCanvas::CalcGamma (float gamma, uint8_t gammalookup[256])
|
||||
void DFrameBuffer::CalcGamma (float gamma, uint8_t gammalookup[256])
|
||||
{
|
||||
// I found this formula on the web at
|
||||
// <http://panda.mostang.com/sane/sane-gamma.html>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue