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

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

Issue 106633002: GBM Ozone implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 bf016369c246e03ebb578e43feb2f6a1c0389eee..23a43f9172b98a2615727e368c58082a0e8265a3 100644
--- a/ui/ozone/platform/dri/screen_manager.cc
+++ b/ui/ozone/platform/dri/screen_manager.cc
@@ -9,14 +9,15 @@
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
-#include "ui/ozone/platform/dri/dri_surface.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"
namespace ui {
-ScreenManager::ScreenManager(DriWrapper* dri)
- : dri_(dri), last_added_widget_(0) {
+ScreenManager::ScreenManager(
+ DriWrapper* dri, ScanoutSurfaceGenerator* surface_generator)
+ : dri_(dri), surface_generator_(surface_generator), last_added_widget_(0) {
}
ScreenManager::~ScreenManager() {
@@ -51,8 +52,8 @@ bool ScreenManager::ConfigureDisplayController(uint32_t crtc,
}
// Create a surface suitable for the current controller.
- scoped_ptr<DriSurface> surface(
- CreateSurface(gfx::Size(mode.hdisplay, mode.vdisplay)));
+ scoped_ptr<ScanoutSurface> surface(
+ surface_generator_->Create(gfx::Size(mode.hdisplay, mode.vdisplay)));
if (!surface->Initialize()) {
LOG(ERROR) << "Failed to initialize surface";
@@ -131,8 +132,4 @@ void ScreenManager::ForceInitializationOfPrimaryDisplay() {
displays[0]->connector()->modes[0]);
}
-DriSurface* ScreenManager::CreateSurface(const gfx::Size& size) {
- return new DriSurface(dri_, size);
-}
-
} // namespace ui
« 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