mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47: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]))
|
this->diffMap[y * w + x2]))
|
||||||
++x2;
|
++x2;
|
||||||
|
|
||||||
unsigned int width = (min(x2 << this->diffShift, this->grabWidth) -
|
unsigned int xstart = x << this->diffShift;
|
||||||
(x << this->diffShift)) * this->bpp;
|
unsigned int xend = min(x2 << this->diffShift, this->grabWidth);
|
||||||
rectCopyUnaligned(frameData, this->frameBuffer, ystart, yend,
|
unsigned int width = xend - xstart;
|
||||||
(x << this->diffShift) * this->bpp, this->shmStride * this->bpp,
|
|
||||||
this->grabStride * this->bpp, width);
|
rectCopyUnaligned(
|
||||||
|
frameData,
|
||||||
|
this->frameBuffer,
|
||||||
|
ystart,
|
||||||
|
yend,
|
||||||
|
xstart * this->bpp,
|
||||||
|
this->shmStride * this->bpp,
|
||||||
|
this->grabStride * this->bpp,
|
||||||
|
width * this->bpp);
|
||||||
|
|
||||||
x = x2;
|
x = x2;
|
||||||
}
|
}
|
||||||
@ -759,9 +767,16 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame, int frameIndex)
|
|||||||
for (int y = 0; y < this->dataHeight; y += 64)
|
for (int y = 0; y < this->dataHeight; y += 64)
|
||||||
{
|
{
|
||||||
int yend = min(this->dataHeight, y + 128);
|
int yend = min(this->dataHeight, y + 128);
|
||||||
rectCopyUnaligned(frameData, this->frameBuffer, y, yend, 0,
|
rectCopyUnaligned(
|
||||||
this->shmStride * this->bpp, this->grabStride * this->bpp,
|
frameData,
|
||||||
this->grabWidth * this->bpp);
|
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);
|
framebuffer_set_write_ptr(frame, yend * this->shmStride * this->bpp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user