~mc-return/compiz/compiz0.9.9.merge-plugin-screensaver

« back to all changes in this revision

Viewing changes to plugins/opengl/src/screen.cpp

  • Committer: MC Return
  • Date: 2012-08-11 17:17:10 UTC
  • mfrom: (3286.2.20 compiz)
  • Revision ID: mc.return@gmx.net-20120811171710-6faligyjru69ejd5
MergedĀ lp:compiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
        return false;
144
144
    }
145
145
 
 
146
    priv->commonFrontbuffer = true;
 
147
    if (glRenderer != NULL && strstr (glRenderer, "on llvmpipe"))
 
148
    {
 
149
        /*
 
150
         * Most drivers use the same frontbuffer infrastructure for
 
151
         * swapbuffers as well as subbuffer copying. However there are some
 
152
         * odd exceptions like LLVMpipe (and SGX-something?) that use separate
 
153
         * buffers, so we can't dynamically switch between buffer swapping and
 
154
         * copying in those cases.
 
155
         */
 
156
        priv->commonFrontbuffer = false;
 
157
    }
 
158
 
146
159
    if (strstr (glExtensions, "GL_ARB_texture_non_power_of_two"))
147
160
        GL::textureNonPowerOfTwo = true;
148
161
 
579
592
    outputRegion (),
580
593
    bindPixmap (),
581
594
    hasCompositing (false),
 
595
    commonFrontbuffer (true),
582
596
    rootPixmapCopy (None),
583
597
    rootPixmapSize ()
584
598
{
642
656
                    GLWindow::get (w)->priv->icons.clear ();
643
657
            }
644
658
            break;
645
 
        break;
 
659
 
646
660
        default:
647
661
            if (event->type == cScreen->damageEvent () + XDamageNotify)
648
662
            {
1133
1147
            glClear (GL_COLOR_BUFFER_BIT);
1134
1148
    }
1135
1149
 
1136
 
    CompRegion tmpRegion (region);
 
1150
    CompRegion tmpRegion = (mask & COMPOSITE_SCREEN_DAMAGE_ALL_MASK) ?
 
1151
                           screen->region () : region;
1137
1152
 
1138
1153
    foreach (CompOutput *output, outputs)
1139
1154
    {
1189
1204
 
1190
1205
    targetOutput = &screen->outputDevs ()[0];
1191
1206
 
1192
 
    if (mask & COMPOSITE_SCREEN_DAMAGE_ALL_MASK)
 
1207
    if ((mask & COMPOSITE_SCREEN_DAMAGE_ALL_MASK) && commonFrontbuffer)
1193
1208
    {
1194
1209
        /*
1195
1210
         * controlSwapVideoSync is much faster than waitForVideoSync because