| Index: ui/ozone/platform/drm/gpu/gbm_surface.cc
|
| diff --git a/ui/ozone/platform/drm/gpu/gbm_surface.cc b/ui/ozone/platform/drm/gpu/gbm_surface.cc
|
| index 4ae84ca58f08d70b66b11f32b229e05136e3829f..ac3c038c15cdad3142d321659aed8efafc6dd4c1 100644
|
| --- a/ui/ozone/platform/drm/gpu/gbm_surface.cc
|
| +++ b/ui/ozone/platform/drm/gpu/gbm_surface.cc
|
| @@ -92,10 +92,8 @@ void GbmSurface::Destroy() {
|
| glDeleteFramebuffersEXT(1, &fbo_);
|
| fbo_ = 0;
|
| }
|
| - for (auto image : images_) {
|
| - if (image)
|
| - image->Destroy(true);
|
| - }
|
| + for (auto& image : images_)
|
| + image = nullptr;
|
|
|
| if (!was_current) {
|
| if (previous_context) {
|
| @@ -133,9 +131,6 @@ bool GbmSurface::CreatePixmaps() {
|
| new GLImageOzoneNativePixmap(GetSize(), GL_BGRA_EXT);
|
| if (!image->Initialize(pixmap.get(), gfx::BufferFormat::BGRA_8888))
|
| return false;
|
| - // GLImage must have Destroy() called before destructor is called.
|
| - if (images_[i])
|
| - images_[i]->Destroy(true);
|
| images_[i] = image;
|
| // Bind image to texture.
|
| gl::ScopedTextureBinder binder(GL_TEXTURE_2D, textures_[i]);
|
|
|