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

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

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: Remove GLImage::Destroy(). 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
« ui/gl/gl_image_glx.cc ('K') | « 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..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]);
« ui/gl/gl_image_glx.cc ('K') | « 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