Commit ce5af556aa72fc850e5f8657cae186a470b91fb8
egl_android: Update native buffer only when it is really changed.
| |   |
| 394 | 394 | update_native_buffer(struct droid_surface *surf) |
| 395 | 395 | { |
| 396 | 396 | struct droid_surface_intel *isurf = lookup_surface(surf); |
| __DRIbuffer *buf = &isurf->native_buffer; |
| 397 | 398 | unsigned int name, cpp, pitch, width, height; |
| 398 | 399 | |
| 399 | 400 | switch (isurf->type) { |
| … | … | |
| 418 | 418 | break; |
| 419 | 419 | } |
| 420 | 420 | |
| isurf->native_buffer.attachment = __DRI_BUFFER_FRONT_LEFT; |
| isurf->native_buffer.name = name; |
| isurf->native_buffer.cpp = cpp; |
| isurf->native_buffer.pitch = pitch; |
| isurf->native_buffer.flags = 0; |
| if (buf->name != name || buf->cpp != cpp || buf->pitch != pitch || |
| isurf->native_width != width || isurf->native_height != height) { |
| buf->attachment = __DRI_BUFFER_FRONT_LEFT; |
| buf->name = name; |
| buf->cpp = cpp; |
| buf->pitch = pitch; |
| buf->flags = 0; |
| 426 | 428 | |
| isurf->native_width = width; |
| isurf->native_height = height; |
| isurf->native_width = width; |
| isurf->native_height = height; |
| 429 | 431 | |
| isurf->native_changed = 1; |
| isurf->native_changed = 1; |
| } |
| 431 | 434 | } |
| 432 | 435 | |
| 433 | 436 | static struct droid_surface * |