Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: ui/ozone/platform/drm/gpu/gbm_surface.cc

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/gl/gl_image_ozone_native_pixmap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « ui/ozone/gl/gl_image_ozone_native_pixmap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698