mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[host] nvfbc: cosmetics
This commit is contained in:
parent
cb849b287c
commit
27f3af8221
@ -743,11 +743,19 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame, int frameIndex)
|
||||
this->diffMap[y * w + x2]))
|
||||
++x2;
|
||||
|
||||
unsigned int width = (min(x2 << this->diffShift, this->grabWidth) -
|
||||
(x << this->diffShift)) * this->bpp;
|
||||
rectCopyUnaligned(frameData, this->frameBuffer, ystart, yend,
|
||||
(x << this->diffShift) * this->bpp, this->shmStride * this->bpp,
|
||||
this->grabStride * this->bpp, width);
|
||||
unsigned int xstart = x << this->diffShift;
|
||||
unsigned int xend = min(x2 << this->diffShift, this->grabWidth);
|
||||
unsigned int width = xend - xstart;
|
||||
|
||||
rectCopyUnaligned(
|
||||
frameData,
|
||||
this->frameBuffer,
|
||||
ystart,
|
||||
yend,
|
||||
xstart * this->bpp,
|
||||
this->shmStride * this->bpp,
|
||||
this->grabStride * this->bpp,
|
||||
width * this->bpp);
|
||||
|
||||
x = x2;
|
||||
}
|
||||
@ -759,9 +767,16 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame, int frameIndex)
|
||||
for (int y = 0; y < this->dataHeight; y += 64)
|
||||
{
|
||||
int yend = min(this->dataHeight, y + 128);
|
||||
rectCopyUnaligned(frameData, this->frameBuffer, y, yend, 0,
|
||||
this->shmStride * this->bpp, this->grabStride * this->bpp,
|
||||
this->grabWidth * this->bpp);
|
||||
rectCopyUnaligned(
|
||||
frameData,
|
||||
this->frameBuffer,
|
||||
y,
|
||||
yend,
|
||||
0,
|
||||
this->shmStride * this->bpp,
|
||||
this->grabStride * this->bpp,
|
||||
this->grabWidth * this->bpp);
|
||||
|
||||
framebuffer_set_write_ptr(frame, yend * this->shmStride * this->bpp);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user