| Index: ui/gfx/ozone/impl/dri_wrapper.cc
|
| diff --git a/ui/gfx/ozone/impl/drm_wrapper_ozone.cc b/ui/gfx/ozone/impl/dri_wrapper.cc
|
| similarity index 77%
|
| rename from ui/gfx/ozone/impl/drm_wrapper_ozone.cc
|
| rename to ui/gfx/ozone/impl/dri_wrapper.cc
|
| index 6697bc009aa950729ae38a41a98d0eabe04f3087..4b6ee1376f2cdf6068817f074655de5cefd18c96 100644
|
| --- a/ui/gfx/ozone/impl/drm_wrapper_ozone.cc
|
| +++ b/ui/gfx/ozone/impl/dri_wrapper.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ui/gfx/ozone/impl/drm_wrapper_ozone.h"
|
| +#include "ui/gfx/ozone/impl/dri_wrapper.h"
|
|
|
| #include <fcntl.h>
|
| #include <unistd.h>
|
| @@ -12,25 +12,25 @@
|
|
|
| namespace gfx {
|
|
|
| -DrmWrapperOzone::DrmWrapperOzone(const char* device_path) {
|
| +DriWrapper::DriWrapper(const char* device_path) {
|
| fd_ = open(device_path, O_RDWR | O_CLOEXEC);
|
| }
|
|
|
| -DrmWrapperOzone::~DrmWrapperOzone() {
|
| +DriWrapper::~DriWrapper() {
|
| if (fd_ >= 0)
|
| close(fd_);
|
| }
|
|
|
| -drmModeCrtc* DrmWrapperOzone::GetCrtc(uint32_t crtc_id) {
|
| +drmModeCrtc* DriWrapper::GetCrtc(uint32_t crtc_id) {
|
| CHECK(fd_ >= 0);
|
| return drmModeGetCrtc(fd_, crtc_id);
|
| }
|
|
|
| -void DrmWrapperOzone::FreeCrtc(drmModeCrtc* crtc) {
|
| +void DriWrapper::FreeCrtc(drmModeCrtc* crtc) {
|
| drmModeFreeCrtc(crtc);
|
| }
|
|
|
| -bool DrmWrapperOzone::SetCrtc(uint32_t crtc_id,
|
| +bool DriWrapper::SetCrtc(uint32_t crtc_id,
|
| uint32_t framebuffer,
|
| uint32_t* connectors,
|
| drmModeModeInfo* mode) {
|
| @@ -38,7 +38,7 @@ bool DrmWrapperOzone::SetCrtc(uint32_t crtc_id,
|
| return !drmModeSetCrtc(fd_, crtc_id, framebuffer, 0, 0, connectors, 1, mode);
|
| }
|
|
|
| -bool DrmWrapperOzone::SetCrtc(drmModeCrtc* crtc, uint32_t* connectors) {
|
| +bool DriWrapper::SetCrtc(drmModeCrtc* crtc, uint32_t* connectors) {
|
| CHECK(fd_ >= 0);
|
| return !drmModeSetCrtc(fd_,
|
| crtc->crtc_id,
|
| @@ -50,7 +50,7 @@ bool DrmWrapperOzone::SetCrtc(drmModeCrtc* crtc, uint32_t* connectors) {
|
| &crtc->mode);
|
| }
|
|
|
| -bool DrmWrapperOzone::AddFramebuffer(const drmModeModeInfo& mode,
|
| +bool DriWrapper::AddFramebuffer(const drmModeModeInfo& mode,
|
| uint8_t depth,
|
| uint8_t bpp,
|
| uint32_t stride,
|
| @@ -67,12 +67,12 @@ bool DrmWrapperOzone::AddFramebuffer(const drmModeModeInfo& mode,
|
| framebuffer);
|
| }
|
|
|
| -bool DrmWrapperOzone::RemoveFramebuffer(uint32_t framebuffer) {
|
| +bool DriWrapper::RemoveFramebuffer(uint32_t framebuffer) {
|
| CHECK(fd_ >= 0);
|
| return !drmModeRmFB(fd_, framebuffer);
|
| }
|
|
|
| -bool DrmWrapperOzone::PageFlip(uint32_t crtc_id,
|
| +bool DriWrapper::PageFlip(uint32_t crtc_id,
|
| uint32_t framebuffer,
|
| void* data) {
|
| CHECK(fd_ >= 0);
|
| @@ -83,7 +83,7 @@ bool DrmWrapperOzone::PageFlip(uint32_t crtc_id,
|
| data);
|
| }
|
|
|
| -bool DrmWrapperOzone::ConnectorSetProperty(uint32_t connector_id,
|
| +bool DriWrapper::ConnectorSetProperty(uint32_t connector_id,
|
| uint32_t property_id,
|
| uint64_t value) {
|
| CHECK(fd_ >= 0);
|
|
|