Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: src/ply-frame-buffer.c

Issue 5819001: Add frame-by-frame animation. (Closed) Base URL: http://git.chromium.org/git/ply-image.git@master
Patch Set: Fix units in comment. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/Makefile ('k') | src/ply-image.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ply-frame-buffer.c
diff --git a/src/ply-frame-buffer.c b/src/ply-frame-buffer.c
index 4baa1f2d0217677bf05c7bb9891ad493586d9ca9..5c5e45bce7c34ccac00dea85994575d4aff701d2 100755
--- a/src/ply-frame-buffer.c
+++ b/src/ply-frame-buffer.c
@@ -550,20 +550,20 @@ ply_frame_buffer_fill (ply_frame_buffer_t *buffer,
{
/* image is wider than buffer */
dst = &buffer->map_address[0];
- src = (char *) (data + hdiff / 2);
+ src = (char *) (data + hdiff / 2 - x);
} else {
- dst = &buffer->map_address[(-hdiff / 2) * buffer->bytes_per_pixel];
+ dst = &buffer->map_address[(-hdiff / 2 + x) * buffer->bytes_per_pixel];
src = (char *) data;
}
if (vdiff >= 0)
{
/* image is taller than buffer */
- src += (vdiff / 2) * area->width * sizeof(*data);
+ src += (vdiff / 2 - y) * area->width * sizeof(*data);
}
else
{
- dst += (-vdiff / 2) * buffer->row_stride * buffer->bytes_per_pixel;
+ dst += (-vdiff / 2 + y) * buffer->row_stride * buffer->bytes_per_pixel;
}
if (buffer->bytes_per_pixel != sizeof(*data))
« no previous file with comments | « src/Makefile ('k') | src/ply-image.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698