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

Unified Diff: ui/ozone/platform/dri/gbm_buffer_base.cc

Issue 908993003: [Ozone-Dri] Rename DriWrapper to DrmDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@udl3-pass-drm-fd
Patch Set: rebased Created 5 years, 10 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/platform/dri/gbm_buffer_base.h ('k') | ui/ozone/platform/dri/gbm_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/gbm_buffer_base.cc
diff --git a/ui/ozone/platform/dri/gbm_buffer_base.cc b/ui/ozone/platform/dri/gbm_buffer_base.cc
index c4b69fff22ba1d3da78731ca1a5aafe73661c9c4..ca835e3773999eec8cef6dcd053940e7238acb49 100644
--- a/ui/ozone/platform/dri/gbm_buffer_base.cc
+++ b/ui/ozone/platform/dri/gbm_buffer_base.cc
@@ -7,7 +7,7 @@
#include <gbm.h>
#include "base/logging.h"
-#include "ui/ozone/platform/dri/dri_wrapper.h"
+#include "ui/ozone/platform/dri/drm_device.h"
namespace ui {
@@ -21,23 +21,20 @@ const uint8_t kPixelDepth = 32;
} // namespace
-GbmBufferBase::GbmBufferBase(const scoped_refptr<DriWrapper>& dri,
+GbmBufferBase::GbmBufferBase(const scoped_refptr<DrmDevice>& drm,
gbm_bo* bo,
bool scanout)
- : dri_(dri), bo_(bo), framebuffer_(0) {
- if (scanout && !dri_->AddFramebuffer(gbm_bo_get_width(bo),
- gbm_bo_get_height(bo),
- kColorDepth,
- kPixelDepth,
- gbm_bo_get_stride(bo),
- gbm_bo_get_handle(bo).u32,
- &framebuffer_))
+ : drm_(drm), bo_(bo), framebuffer_(0) {
+ if (scanout &&
+ !drm_->AddFramebuffer(gbm_bo_get_width(bo), gbm_bo_get_height(bo),
+ kColorDepth, kPixelDepth, gbm_bo_get_stride(bo),
+ gbm_bo_get_handle(bo).u32, &framebuffer_))
LOG(ERROR) << "Failed to register buffer";
}
GbmBufferBase::~GbmBufferBase() {
if (framebuffer_)
- dri_->RemoveFramebuffer(framebuffer_);
+ drm_->RemoveFramebuffer(framebuffer_);
}
uint32_t GbmBufferBase::GetFramebufferId() const {
« no previous file with comments | « ui/ozone/platform/dri/gbm_buffer_base.h ('k') | ui/ozone/platform/dri/gbm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698