~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to libdevice/directfb/DirectFBDevice.cpp

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-04 03:19:06 UTC
  • mfrom: (1.1.18) (3.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120304031906-p6q5rnb0xhgpof7o
Tags: 0.8.10-3ubuntu1
* Merge from Debian testing (FFe: LP: #940876), remaining changes:
  - Use mozilla-flashplugin as the alternative for now
  - Change xulrunner-dev build dep to firefox-dev
* Drop the plugin API porting patch, this has been fixed upstream
  - drop debian/patches*
* Drop the following change as we want Adobe's player to take priority
  if it's installed
  - Set alternative priority to 50 so that it matches Adobe Flash's priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
3
 
//   Free Software Foundation, Inc
 
2
//   Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc
4
3
//
5
4
// This program is free software; you can redistribute it and/or modify
6
5
// it under the terms of the GNU General Public License as published by
76
75
    GNASH_REPORT_FUNCTION;
77
76
    
78
77
    if (!initDevice(argc, argv)) {
79
 
        log_error("Couldn't initialize DirectFB device!");
 
78
        log_error(_("Couldn't initialize DirectFB device!"));
80
79
    }
81
80
}
82
81
 
112
111
    DFBResult result = DFB_FAILURE;
113
112
 
114
113
    if ((result = DirectFBInit(&argc, &argv)) != DFB_OK) {
115
 
        log_error("DirectFBInit(): %s", getErrorString(result));
 
114
        log_error(_("DirectFBInit(): %s"), getErrorString(result));
116
115
        return false;
117
116
    }
118
117
 
119
118
    if ((result = DirectFBCreate(&_dfb)) != DFB_OK) {
120
 
        log_error("DirectFBCreate(): %s", getErrorString(result));
 
119
        log_error(_("DirectFBCreate(): %s"), getErrorString(result));
121
120
        return false;
122
121
    }
123
122
 
144
143
    dsc.caps = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY | DSCAPS_FLIPPING);
145
144
    
146
145
    if ((result = _dfb->CreateSurface(_dfb, &dsc, &_surface)) != DFB_OK) {
147
 
        log_error("CreateSurface(): %s", getErrorString(result));
 
146
        log_error(_("CreateSurface(): %s"), getErrorString(result));
148
147
        return false;
149
148
    }
150
149
 
156
155
    fdesc.height = y/10;
157
156
    
158
157
    if ((result == _dfb->CreateFont(_dfb, FONT, &fdesc, &_font)) == DR_OK) {
159
 
        log_error("CreateFont(): %s", getErrorString(result));
 
158
        log_error(_("CreateFont(): %s"), getErrorString(result));
160
159
    }
161
160
    _surface->SetFont(_surface, _font);
162
161
 
163
162
#if 0
164
163
    DFBSurfaceDescription sdesc;
165
164
    if ((result == _dfb->CreateImageProvider(_dfb, "/tmp/img832a.jpg", &_provider)) != DR_OK) {
166
 
        log_error("CreateImageProvider(): %s", getErrorString(result));
 
165
        log_error(_("CreateImageProvider(): %s"), getErrorString(result));
167
166
    }
168
167
    _provider->GetSurfaceDescription(_provider, &sdesc);
169
168
#endif
170
169
 
171
170
    if ((result == _dfb->GetDisplayLayer(_dfb, DLID_PRIMARY, &_layer)) == DR_OK) {
172
 
        log_error("GetDisplayLayer(): %s", getErrorString(result));
 
171
        log_error(_("GetDisplayLayer(): %s"), getErrorString(result));
173
172
    }
174
173
    
175
174
    if ((result == _layer->GetScreen(_layer, &_screen)) == DR_OK) {
176
 
        log_error("GetScreen(): %s", getErrorString(result));
 
175
        log_error(_("GetScreen(): %s"_, getErrorString(result));
177
176
    }
178
177
    
179
178
    DFBSurfacePixelFormat format;
510
509
        DFBScreenDescription sdesc;
511
510
        // FIXME: On Ubuntu, this returns the wrong result
512
511
        if ((result == screen->GetDescription(screen, &sdesc)) == DR_OK) {
513
 
            log_error("GetDescription(): %s", getErrorString(result));
 
512
            log_error(_("GetDescription(): %s"), getErrorString(result));
514
513
        }
515
514
 
516
515
        if (sdesc.name) {
899
898
        printSurfaceDrawingFlags(desc.drawing_flags);
900
899
 
901
900
    } else {
902
 
        log_error("iDirectFB data not set!");
 
901
        log_error(_("iDirectFB data not set!"));
903
902
    }
904
903
}
905
904