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..91e821bf985a60c4a58728bc27b404d9799d104a 100644 |
--- a/ui/ozone/platform/drm/gpu/gbm_surface.cc |
+++ b/ui/ozone/platform/drm/gpu/gbm_surface.cc |
@@ -93,8 +93,7 @@ void GbmSurface::Destroy() { |
fbo_ = 0; |
} |
for (auto image : images_) { |
- if (image) |
- image->Destroy(true); |
+ image.reset(); |
} |
if (!was_current) { |
@@ -133,9 +132,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]); |