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

Unified Diff: ui/wayland/wayland_screen.cc

Issue 10009024: Remove WAYLAND port (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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/wayland/wayland_screen.h ('k') | ui/wayland/wayland_shm_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wayland/wayland_screen.cc
diff --git a/ui/wayland/wayland_screen.cc b/ui/wayland/wayland_screen.cc
deleted file mode 100644
index c29bc567744d407d512fa01c1bed8449f87958e1..0000000000000000000000000000000000000000
--- a/ui/wayland/wayland_screen.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2011 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/wayland/wayland_screen.h"
-
-#include <wayland-client.h>
-
-#include "ui/wayland/wayland_display.h"
-
-namespace ui {
-
-WaylandScreen::WaylandScreen(WaylandDisplay* display, uint32_t id)
- : output_(NULL),
- display_(display) {
- static const wl_output_listener kOutputListener = {
- WaylandScreen::OutputHandleGeometry,
- WaylandScreen::OutputHandleMode,
- };
-
- output_ = static_cast<wl_output*>(
- wl_display_bind(display_->display(), id, &wl_output_interface));
- wl_output_add_listener(output_, &kOutputListener, this);
-}
-
-WaylandScreen::~WaylandScreen() {
- if (output_)
- wl_output_destroy(output_);
-}
-
-gfx::Rect WaylandScreen::GetAllocation() const {
- gfx::Rect allocation;
- allocation.set_origin(position_);
-
- // Find the active mode and pass its dimensions.
- for (Modes::const_iterator i = modes_.begin(); i != modes_.end(); ++i) {
- if ((*i).flags & WL_OUTPUT_MODE_CURRENT) {
- allocation.set_width((*i).width);
- allocation.set_height((*i).height);
- break;
- }
- }
-
- return allocation;
-}
-
-// static
-void WaylandScreen::OutputHandleGeometry(void* data,
- wl_output* output,
- int32_t x,
- int32_t y,
- int32_t physical_width,
- int32_t physical_height,
- int32_t subpixel,
- const char* make,
- const char* model) {
- WaylandScreen* screen = static_cast<WaylandScreen*>(data);
- screen->position_.SetPoint(x, y);
-}
-
-// static
-void WaylandScreen::OutputHandleMode(void* data,
- wl_output* wl_output,
- uint32_t flags,
- int32_t width,
- int32_t height,
- int32_t refresh) {
- WaylandScreen* screen = static_cast<WaylandScreen*>(data);
-
- Mode mode;
- mode.width = width;
- mode.height = height;
- mode.refresh = refresh;
- mode.flags = flags;
-
- screen->modes_.push_back(mode);
-}
-
-} // namespace ui
« no previous file with comments | « ui/wayland/wayland_screen.h ('k') | ui/wayland/wayland_shm_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698