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

Unified Diff: ui/ozone/platform/dri/dri_buffer.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/dri_buffer.h ('k') | ui/ozone/platform/dri/dri_console_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_buffer.cc
diff --git a/ui/ozone/platform/dri/dri_buffer.cc b/ui/ozone/platform/dri/dri_buffer.cc
index 9fa284f2d39611c73f772ca191944020752fac7e..bd2c2c26c5df060dda43c1d2fe461afdbfdfeb4b 100644
--- a/ui/ozone/platform/dri/dri_buffer.cc
+++ b/ui/ozone/platform/dri/dri_buffer.cc
@@ -5,7 +5,7 @@
#include "ui/ozone/platform/dri/dri_buffer.h"
#include "base/logging.h"
-#include "ui/ozone/platform/dri/dri_wrapper.h"
+#include "ui/ozone/platform/dri/drm_device.h"
namespace ui {
@@ -34,8 +34,8 @@ uint8_t GetColorDepth(SkColorType type) {
} // namespace
-DriBuffer::DriBuffer(const scoped_refptr<DriWrapper>& dri)
- : dri_(dri), handle_(0), framebuffer_(0) {
+DriBuffer::DriBuffer(const scoped_refptr<DrmDevice>& drm)
+ : drm_(drm), handle_(0), framebuffer_(0) {
}
DriBuffer::~DriBuffer() {
@@ -43,26 +43,26 @@ DriBuffer::~DriBuffer() {
return;
if (framebuffer_)
- dri_->RemoveFramebuffer(framebuffer_);
+ drm_->RemoveFramebuffer(framebuffer_);
SkImageInfo info;
void* pixels = const_cast<void*>(surface_->peekPixels(&info, NULL));
if (!pixels)
return;
- dri_->DestroyDumbBuffer(info, handle_, stride_, pixels);
+ drm_->DestroyDumbBuffer(info, handle_, stride_, pixels);
}
bool DriBuffer::Initialize(const SkImageInfo& info,
bool should_register_framebuffer) {
void* pixels = NULL;
- if (!dri_->CreateDumbBuffer(info, &handle_, &stride_, &pixels)) {
+ if (!drm_->CreateDumbBuffer(info, &handle_, &stride_, &pixels)) {
VLOG(2) << "Cannot create drm dumb buffer";
return false;
}
if (should_register_framebuffer &&
- !dri_->AddFramebuffer(
+ !drm_->AddFramebuffer(
info.width(), info.height(), GetColorDepth(info.colorType()),
info.bytesPerPixel() << 3, stride_, handle_, &framebuffer_)) {
VLOG(2) << "Failed to register framebuffer: " << strerror(errno);
@@ -100,7 +100,7 @@ DriBufferGenerator::DriBufferGenerator() {
DriBufferGenerator::~DriBufferGenerator() {}
scoped_refptr<ScanoutBuffer> DriBufferGenerator::Create(
- const scoped_refptr<DriWrapper>& drm,
+ const scoped_refptr<DrmDevice>& drm,
const gfx::Size& size) {
scoped_refptr<DriBuffer> buffer(new DriBuffer(drm));
SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
« no previous file with comments | « ui/ozone/platform/dri/dri_buffer.h ('k') | ui/ozone/platform/dri/dri_console_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698