~ubuntu-branches/ubuntu/maverick/xorg-server/maverick-security

« back to all changes in this revision

Viewing changes to hw/xfree86/modes/xf86Rotate.c

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2010-08-05 11:25:14 UTC
  • mfrom: (1.1.35 upstream) (0.1.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100805112514-q4efdgj3nblevos2
Tags: 2:1.8.99.905-1ubuntu1
* Merge from (unreleased) Debian experimental.  Remaining Ubuntu changes:
  - rules, control:
    + Disable SELinux, libaudit-dev is not in main yet (LP 406226).
      Drop libaudit-dev from build-deps.
  - rules: Enable xcsecurity (LP 247537).
  - local/xvfb-run*: Add correct docs about error codes (LP 328205)
  - rules: Add --with-extra-module-dir to support GL alternatives.
  - control: Xvfb depends on xauth, x11-xkb-utils. (LP 500102)
  - rules, local/64-xorg-xkb.rules: Don't use keyboard-configuration
    until it's available.
  - control: Update some versioned Breaks for Ubuntu versions.
  - debian/patches:
    + 100_rethrow_signals.patch:
      When aborting, re-raise signals for apport
    + 109_fix-swcursor-crash.patch:
      Avoid dereferencing null pointer while reloading cursors during
      resume. (LP 371405)
    + 111_armel-drv-fallbacks.patch:
      Add support for armel driver fallbacks.
    + 121_only_switch_vt_when_active.diff:
      Add a check to prevent the X server from changing the VT when killing
      GDM from the console.
    + 122_xext_fix_card32_overflow_in_xauth.patch:
      Fix server crash when “xauth generate” is called with large timeout.
    + 157_check_null_modes.patch, 162_null_crtc_in_rotation.patch,
      166_nullptr_xinerama_keyrepeat.patch, 167_nullptr_xisbread.patch
      169_mipointer_nullptr_checks.patch,
      172_cwgetbackingpicture_nullptr_check.patch:
      Fix various segfaults in xserver by checking pointers for NULL
      values before dereferencing them.
    + 165_man_xorg_conf_no_device_ident.patch
      Correct man page
    + 168_glibc_trace_to_stderr.patch:
      Report abort traces to stderr instead of terminal
    + 184_virtual_devices_autodetect.patch:
      Use vesa for qemu device, which is not supported by cirrus
    + 187_edid_quirk_hp_nc8430.patch:
      Quirk for another LPL monitor (LP 380009)
    + 188_default_primary_to_first_busid.patch:
      Pick the first device and carry on (LP 459512)
    + 189_xserver_1.5.0_bg_none_root.patch:
      Create a root window with no background.
    + 190_cache-xkbcomp_output_for_fast_start_up.patch:
      Cache keyboard settings.
    + 191-Xorg-add-an-extra-module-path.patch:
      Add support for the alternatives module path.
    + 197_xvfb-randr.patch:
      Adds xrandr support to xvfb. (LP 516123)
    + 198_nohwaccess.patch:
      Adds a -nohwaccess argument to make X not access the hardware
      ports directly.
    + 200_randr-null.patch:
      Clarify a pointer initialization.
* Update changelog entries for 1.8.1.902-1 which became 1.8.99.904-1
* Drop 196_xvfbscreeninit-handling.patch: it's semantically empty, and now 
  doesn't apply.  Merge remaining #include change into 197_xvfb-randr.patch
* New upstream version will start correctly when no outputs are connected,
  as long as the video driver can dynamically resize the framebuffer
  (true for all KMS drivers) (LP: #337889)
* New upstream version fixes crash on non-admin logout with KDE (LP: #569879)
* Refresh 111_armel-drv-fallbacks.patch to fix the build on armel

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
{
77
77
    ScrnInfoPtr         scrn = crtc->scrn;
78
78
    ScreenPtr           screen = scrn->pScreen;
79
 
    WindowPtr           root = WindowTable[screen->myNum];
 
79
    WindowPtr           root = screen->root;
80
80
    PixmapPtr           dst_pixmap = crtc->rotatedPixmap;
81
 
    PictFormatPtr       format = compWindowFormat (WindowTable[screen->myNum]);
 
81
    PictFormatPtr       format = compWindowFormat (screen->root);
82
82
    int                 error;
83
83
    PicturePtr          src, dst;
84
 
    int                 n = REGION_NUM_RECTS(region);
85
 
    BoxPtr              b = REGION_RECTS(region);
 
84
    int                 n = RegionNumRects(region);
 
85
    BoxPtr              b = RegionRects(region);
86
86
    XID                 include_inferiors = IncludeInferiors;
87
87
    
88
88
    src = CreatePicture (None,
167
167
    if (damage_box.y1 < 0) damage_box.y1 = 0;
168
168
    if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width;
169
169
    if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height;
170
 
    REGION_INIT (pScreen, &damage_region, &damage_box, 1);
 
170
    RegionInit(&damage_region, &damage_box, 1);
171
171
    DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
172
172
                        &damage_region);
173
 
    REGION_UNINIT (pScreen, &damage_region);
 
173
    RegionUninit(&damage_region);
174
174
    crtc->shadowClear = TRUE;
175
175
}
176
176
 
217
217
        return FALSE;
218
218
    xf86RotatePrepare (pScreen);
219
219
    region = DamageRegion(damage);
220
 
    if (REGION_NOTEMPTY(pScreen, region)) 
 
220
    if (RegionNotEmpty(region))
221
221
    {
222
222
        int                     c;
223
223
        SourceValidateProcPtr   SourceValidate;
240
240
                RegionRec   crtc_damage;
241
241
 
242
242
                /* compute portion of damage that overlaps crtc */
243
 
                REGION_INIT(pScreen, &crtc_damage, &crtc->bounds, 1);
244
 
                REGION_INTERSECT (pScreen, &crtc_damage, &crtc_damage, region);
 
243
                RegionInit(&crtc_damage, &crtc->bounds, 1);
 
244
                RegionIntersect(&crtc_damage, &crtc_damage, region);
245
245
                
246
246
                /* update damaged region */
247
 
                if (REGION_NOTEMPTY(pScreen, &crtc_damage))
 
247
                if (RegionNotEmpty(&crtc_damage))
248
248
                    xf86RotateCrtcRedisplay (crtc, &crtc_damage);
249
249
                
250
 
                REGION_UNINIT (pScreen, &crtc_damage);
 
250
                RegionUninit(&crtc_damage);
251
251
            }
252
252
        }
253
253
        pScreen->SourceValidate = SourceValidate;
405
405
         */
406
406
        xf86RotateDestroy (crtc);
407
407
        crtc->transform_in_use = FALSE;
408
 
        if (new_params)
409
 
            xfree (new_params);
 
408
        free(new_params);
410
409
        new_params = NULL;
411
410
        new_nparams = 0;
412
411
        new_filter = NULL;
467
466
        if (transform)
468
467
        {
469
468
            if (transform->nparams) {
470
 
                new_params = xalloc (transform->nparams * sizeof (xFixed));
 
469
                new_params = malloc(transform->nparams * sizeof (xFixed));
471
470
                if (new_params) {
472
471
                    memcpy (new_params, transform->params,
473
472
                            transform->nparams * sizeof (xFixed));
506
505
    crtc->crtc_to_framebuffer = crtc_to_fb;
507
506
    crtc->f_crtc_to_framebuffer = f_crtc_to_fb;
508
507
    crtc->f_framebuffer_to_crtc = f_fb_to_crtc;
509
 
    if (crtc->params)
510
 
        xfree (crtc->params);
 
508
    free(crtc->params);
511
509
    crtc->params = new_params;
512
510
    crtc->nparams = new_nparams;
513
511
    crtc->filter = new_filter;