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

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

Issue 393233005: [Ozone-DRI] Convert HardwareDisplayController to use scanout buffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/screen_manager.h ('k') | ui/ozone/platform/dri/screen_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/screen_manager.cc
diff --git a/ui/ozone/platform/dri/screen_manager.cc b/ui/ozone/platform/dri/screen_manager.cc
index ada162daeb0238aabd3fccd78ab1780ab209c4a1..8085a3e1f4c47a151965373134a8d4c20f009c81 100644
--- a/ui/ozone/platform/dri/screen_manager.cc
+++ b/ui/ozone/platform/dri/screen_manager.cc
@@ -11,13 +11,13 @@
#include "ui/gfx/geometry/size.h"
#include "ui/ozone/platform/dri/dri_util.h"
#include "ui/ozone/platform/dri/hardware_display_controller.h"
-#include "ui/ozone/platform/dri/scanout_surface.h"
+#include "ui/ozone/platform/dri/scanout_buffer.h"
namespace ui {
ScreenManager::ScreenManager(
- DriWrapper* dri, ScanoutSurfaceGenerator* surface_generator)
- : dri_(dri), surface_generator_(surface_generator), last_added_widget_(0) {
+ DriWrapper* dri, ScanoutBufferGenerator* buffer_generator)
+ : dri_(dri), buffer_generator_(buffer_generator), last_added_widget_(0) {
}
ScreenManager::~ScreenManager() {
@@ -45,7 +45,6 @@ bool ScreenManager::ConfigureDisplayController(uint32_t crtc,
return it->second->Enable();
controller = it->second;
- controller->UnbindSurfaceFromController();
}
if (it == controllers_.end()) {
@@ -54,19 +53,16 @@ bool ScreenManager::ConfigureDisplayController(uint32_t crtc,
}
// Create a surface suitable for the current controller.
- scoped_ptr<ScanoutSurface> surface(
- surface_generator_->Create(gfx::Size(mode.hdisplay, mode.vdisplay)));
+ scoped_refptr<ScanoutBuffer> buffer =
+ buffer_generator_->Create(gfx::Size(mode.hdisplay, mode.vdisplay));
- if (!surface->Initialize()) {
- LOG(ERROR) << "Failed to initialize surface";
+ if (!buffer) {
+ LOG(ERROR) << "Failed to create scanout buffer";
return false;
}
- // Bind the surface to the controller. This will register the backing buffers
- // with the hardware CRTC such that we can show the buffers and performs the
- // initial modeset. The controller takes ownership of the surface.
- if (!controller->BindSurfaceToController(surface.Pass(), mode)) {
- LOG(ERROR) << "Failed to bind surface to controller";
+ if (!controller->Modeset(OverlayPlane(buffer), mode)) {
+ LOG(ERROR) << "Failed to modeset controller";
return false;
}
« no previous file with comments | « ui/ozone/platform/dri/screen_manager.h ('k') | ui/ozone/platform/dri/screen_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698