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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_buffer_base.cc

Issue 2790553002: Remove opaque frame buffer in destructor of GbmBufferBase. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h" 5 #include "ui/ozone/platform/drm/gpu/gbm_buffer_base.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/ozone/platform/drm/common/drm_util.h" 10 #include "ui/ozone/platform/drm/common/drm_util.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 opaque_framebuffer_pixel_format_, handles, strides, 49 opaque_framebuffer_pixel_format_, handles, strides,
50 offsets, modifiers, &opaque_framebuffer_, 50 offsets, modifiers, &opaque_framebuffer_,
51 addfb_flags); 51 addfb_flags);
52 } 52 }
53 } 53 }
54 } 54 }
55 55
56 GbmBufferBase::~GbmBufferBase() { 56 GbmBufferBase::~GbmBufferBase() {
57 if (framebuffer_) 57 if (framebuffer_)
58 drm_->RemoveFramebuffer(framebuffer_); 58 drm_->RemoveFramebuffer(framebuffer_);
59 if (opaque_framebuffer_)
60 drm_->RemoveFramebuffer(opaque_framebuffer_);
59 } 61 }
60 62
61 uint32_t GbmBufferBase::GetFramebufferId() const { 63 uint32_t GbmBufferBase::GetFramebufferId() const {
62 return framebuffer_; 64 return framebuffer_;
63 } 65 }
64 66
65 uint32_t GbmBufferBase::GetOpaqueFramebufferId() const { 67 uint32_t GbmBufferBase::GetOpaqueFramebufferId() const {
66 return opaque_framebuffer_ ? opaque_framebuffer_ : framebuffer_; 68 return opaque_framebuffer_ ? opaque_framebuffer_ : framebuffer_;
67 } 69 }
68 70
(...skipping 17 matching lines...) Expand all
86 88
87 const DrmDevice* GbmBufferBase::GetDrmDevice() const { 89 const DrmDevice* GbmBufferBase::GetDrmDevice() const {
88 return drm_.get(); 90 return drm_.get();
89 } 91 }
90 92
91 bool GbmBufferBase::RequiresGlFinish() const { 93 bool GbmBufferBase::RequiresGlFinish() const {
92 return !drm_->is_primary_device(); 94 return !drm_->is_primary_device();
93 } 95 }
94 96
95 } // namespace ui 97 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698