mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Menu work, move VOS queue interface
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include "QDGraf.h"
|
||||
#include "QDPixMap.h"
|
||||
#include "QDPort.h"
|
||||
#include "IGpDisplayDriver.h"
|
||||
#include "IGpDisplayDriverSurface.h"
|
||||
|
||||
void CGraf::PushToDDSurface(IGpDisplayDriver *displayDriver)
|
||||
{
|
||||
const PixMap *pixMap = *m_port.GetPixMap();
|
||||
const size_t width = pixMap->m_rect.right - pixMap->m_rect.left;
|
||||
const size_t height = pixMap->m_rect.bottom - pixMap->m_rect.top;
|
||||
|
||||
if (m_port.IsDirty(PortabilityLayer::QDPortDirtyFlag_Size))
|
||||
{
|
||||
if (m_ddSurface != nullptr)
|
||||
m_ddSurface->Destroy();
|
||||
|
||||
m_ddSurface = nullptr;
|
||||
m_port.ClearDirty(PortabilityLayer::QDPortDirtyFlag_Size);
|
||||
}
|
||||
|
||||
if (m_ddSurface == nullptr)
|
||||
m_ddSurface = displayDriver->CreateSurface(pixMap->m_rect.right - pixMap->m_rect.left, pixMap->m_rect.bottom - pixMap->m_rect.top, pixMap->m_pixelFormat);
|
||||
|
||||
if (m_port.IsDirty(PortabilityLayer::QDPortDirtyFlag_Contents) && m_ddSurface != nullptr)
|
||||
{
|
||||
m_ddSurface->UploadEntire(pixMap->m_data, pixMap->m_pitch);
|
||||
m_port.ClearDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user