~gerboland/qtubuntu/fix_1351024

« back to all changes in this revision

Viewing changes to src/platforms/ubuntulegacy/screen.cc

  • Committer: CI bot
  • Author(s): Gerry Boland, Daniel d'Andrada
  • Date: 2014-07-28 02:37:08 UTC
  • mfrom: (231.1.14 ubuntumirclient-only)
  • Revision ID: ps-jenkins@lists.canonical.com-20140728023708-iv11mcwrd0pzjv0c
Major refactor: remove SurfaceFlinger & Mir in-server-process-client support, flatten class hierarchy. Only Mir client QPA remains


 
Approved by: Michael Terry, Ricardo Mendoza

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// This file is part of QtUbuntu, a set of Qt components for Ubuntu.
2
 
// Copyright © 2013 Canonical Ltd.
3
 
//
4
 
// This program is free software: you can redistribute it and/or modify it under
5
 
// the terms of the GNU Lesser General Public License version 3, as published by
6
 
// the Free Software Foundation.
7
 
//
8
 
// This program is distributed in the hope that it will be useful, but WITHOUT
9
 
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
 
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
// Lesser General Public License for more details.
12
 
//
13
 
// You should have received a copy of the GNU Lesser General Public License
14
 
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 
16
 
#include "screen.h"
17
 
#include "base/logging.h"
18
 
#include <surface_flinger/surface_flinger_compatibility_layer.h>
19
 
 
20
 
QUbuntuLegacyScreen::QUbuntuLegacyScreen() {
21
 
  const int kScreenWidth = sf_get_display_width(SURFACE_FLINGER_DEFAULT_DISPLAY_ID);
22
 
  const int kScreenHeight = sf_get_display_height(SURFACE_FLINGER_DEFAULT_DISPLAY_ID);
23
 
  ASSERT(kScreenWidth > 0 && kScreenHeight > 0);
24
 
  geometry_ = QRect(0, 0, kScreenWidth, kScreenHeight);
25
 
  ASSERT((sfClient_ = sf_client_create_full(false)) != NULL);
26
 
  DLOG("QUbuntuLegacyScreen::QUbuntuLegacyScreen (this=%p)", this);
27
 
}
28
 
 
29
 
QUbuntuLegacyScreen::~QUbuntuLegacyScreen() {
30
 
  DLOG("QUbuntuLegacyScreen::~QUbuntuLegacyScreen");
31
 
  // FIXME(loicm) Invalid because the struct is forward declarated, we need a way to clean the
32
 
  //     handle correctly.
33
 
  // delete sfClient_;
34
 
}