~serge-hallyn/ubuntu/raring/spice/spice-fixed2

« back to all changes in this revision

Viewing changes to client/windows/red_pixmap.cpp

  • Committer: Package Import Robot
  • Author(s): Liang Guo
  • Date: 2011-07-23 12:21:04 UTC
  • Revision ID: package-import@ubuntu.com-20110723122104-gvv70gd6ui6213qd
Tags: upstream-0.8.2
ImportĀ upstreamĀ versionĀ 0.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   Copyright (C) 2009 Red Hat, Inc.
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Lesser General Public
 
6
   License as published by the Free Software Foundation; either
 
7
   version 2.1 of the License, or (at your option) any later version.
 
8
 
 
9
   This library is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   Lesser General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Lesser General Public
 
15
   License along with this library; if not, see <http://www.gnu.org/licenses/>.
 
16
*/
 
17
 
 
18
#include "common.h"
 
19
#include "red_pixmap.h"
 
20
#include "debug.h"
 
21
#include "utils.h"
 
22
 
 
23
RedPixmap::RedPixmap(int width, int height, RedDrawable::Format format,
 
24
                     bool top_bottom)
 
25
    : _format (format)
 
26
    , _width (width)
 
27
    , _height (height)
 
28
    , _stride (SPICE_ALIGN(width * format_to_bpp(format), 32) / 8)
 
29
    , _top_bottom (top_bottom)
 
30
    , _data (NULL)
 
31
{
 
32
}
 
33
 
 
34
RedPixmap::~RedPixmap()
 
35
{
 
36
}
 
37
 
 
38
bool RedPixmap::is_big_endian_bits()
 
39
{
 
40
    return _format == RedDrawable::A1;
 
41
}
 
42