Commit ce5af556aa72fc850e5f8657cae186a470b91fb8

  • avatar
  • Chia-I Wu <olvaffe @gm…l.com>
  • Fri Oct 30 10:27:14 CET 2009
egl_android: Update native buffer only when it is really changed.
  
394394update_native_buffer(struct droid_surface *surf)
395395{
396396 struct droid_surface_intel *isurf = lookup_surface(surf);
397 __DRIbuffer *buf = &isurf->native_buffer;
397398 unsigned int name, cpp, pitch, width, height;
398399
399400 switch (isurf->type) {
418418 break;
419419 }
420420
421 isurf->native_buffer.attachment = __DRI_BUFFER_FRONT_LEFT;
422 isurf->native_buffer.name = name;
423 isurf->native_buffer.cpp = cpp;
424 isurf->native_buffer.pitch = pitch;
425 isurf->native_buffer.flags = 0;
421 if (buf->name != name || buf->cpp != cpp || buf->pitch != pitch ||
422 isurf->native_width != width || isurf->native_height != height) {
423 buf->attachment = __DRI_BUFFER_FRONT_LEFT;
424 buf->name = name;
425 buf->cpp = cpp;
426 buf->pitch = pitch;
427 buf->flags = 0;
426428
427 isurf->native_width = width;
428 isurf->native_height = height;
429 isurf->native_width = width;
430 isurf->native_height = height;
429431
430 isurf->native_changed = 1;
432 isurf->native_changed = 1;
433 }
431434}
432435
433436static struct droid_surface *