Dont call eglDestroyImageKHR in move construtor
since image_ and display_ are not initialized.
Google Issue: 44452
Change-Id: Ie20be3b021d4562f2cd8a89d2666307afcde1cf2
AutoEGLDisplayImage(const AutoEGLDisplayImage& rhs) = delete;
AutoEGLDisplayImage(AutoEGLDisplayImage&& rhs) {
- clear();
- std::swap(display_, rhs.display_);
- std::swap(image_, rhs.image_);
+ display_ = rhs.display_;
+ image_ = rhs.image_;
+ rhs.display_ = EGL_NO_DISPLAY;
+ rhs.image_ = EGL_NO_IMAGE_KHR;
}
~AutoEGLDisplayImage() {