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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
Index: ui/ozone/platform/dri/hardware_display_plane_manager.cc
diff --git a/ui/ozone/platform/dri/hardware_display_plane_manager.cc b/ui/ozone/platform/dri/hardware_display_plane_manager.cc
deleted file mode 100644
index 0e9bc999b76a529ee4456c37889eb2c59b6d2dc4..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/dri/hardware_display_plane_manager.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/ozone/platform/dri/hardware_display_plane_manager.h"
-
-#include <drm.h>
-#include <errno.h>
-#include <xf86drm.h>
-
-#include "base/logging.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/ozone/platform/dri/dri_wrapper.h"
-
-namespace ui {
-
-HardwareDisplayPlaneManager::HardwareDisplayPlaneManager(DriWrapper* drm)
- : drm_(drm), property_set_(NULL) {
-}
-
-HardwareDisplayPlaneManager::~HardwareDisplayPlaneManager() {
- if (property_set_)
- drmModePropertySetFree(property_set_);
-}
-
-bool HardwareDisplayPlaneManager::Initialize() {
- ScopedDrmPlaneResPtr plane_resources(
- drmModeGetPlaneResources(drm_->get_fd()));
- if (!plane_resources) {
- LOG(ERROR) << "Failed to get plane resources.";
- return false;
- }
-
- property_set_ = drmModePropertySetAlloc();
- if (!property_set_) {
- LOG(ERROR) << "Failed to allocate property set.";
- return false;
- }
-
- uint32_t num_planes = plane_resources->count_planes;
- for (uint32_t i = 0; i < num_planes; ++i) {
- ScopedDrmPlanePtr drm_plane(
- drmModeGetPlane(drm_->get_fd(), plane_resources->planes[i]));
- if (!drm_plane) {
- LOG(ERROR) << "Failed to get plane " << i << ".";
- return false;
- }
- scoped_ptr<HardwareDisplayPlane> plane(
- new HardwareDisplayPlane(drm_, property_set_, drm_plane.Pass()));
- if (plane->Initialize())
- planes_.push_back(plane.release());
- }
-
- return true;
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_plane_manager.h ('k') | ui/ozone/platform/dri/native_display_delegate_dri.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698