| 365 | } |
| 366 | |
| 367 | void flipYBuffer(unsigned char *data) |
| 368 | { |
| 369 | typedef unsigned char type; |
| 370 | |
| 371 | size_t linestep = width * bytes_per_pixel / sizeof(type); |
| 372 | |
| 373 | type *first_line = reinterpret_cast<type *>(data), *last_line = reinterpret_cast<type *>(data) + (height - 1) * linestep; |
| 374 | |
| 375 | for(size_t y = 0; y < height / 2; ++y) |
| 376 | { |
| 377 | for(size_t x = 0; x < linestep; ++x, ++first_line, ++last_line) |
| 378 | { |
| 379 | std::swap(*first_line, *last_line); |
| 380 | } |
| 381 | last_line -= 2 * linestep; |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | Frame *downloadToNewFrame() |
| 386 | { |
nothing calls this directly
no outgoing calls
no test coverage detected