зеркало из https://github.com/mozilla/gecko-dev.git
Bug 615976 - Post-patch cleanup for WebGL antialiasing - r=bjacob
This commit is contained in:
Родитель
b0a291feca
Коммит
adc55de3c1
|
@ -1111,7 +1111,7 @@ BasicCanvasLayer::UpdateSurface(gfxASurface* aDestSurface)
|
|||
mGLContext->MakeCurrent();
|
||||
|
||||
#if defined (MOZ_X11) && defined (MOZ_EGL_XRENDER_COMPOSITE)
|
||||
mGLContext->Finish();
|
||||
mGLContext->fFinish();
|
||||
gfxASurface* offscreenSurface = mGLContext->GetOffscreenPixmapSurface();
|
||||
|
||||
// XRender can only blend premuliplied alpha, so only allow xrender
|
||||
|
|
|
@ -532,7 +532,8 @@ public:
|
|||
GLContext(const ContextFormat& aFormat,
|
||||
bool aIsOffscreen = false,
|
||||
GLContext *aSharedContext = nsnull)
|
||||
: mInitialized(false),
|
||||
: mOffscreenFBOsDirty(false),
|
||||
mInitialized(false),
|
||||
mIsOffscreen(aIsOffscreen),
|
||||
#ifdef USE_GLES2
|
||||
mIsGLES2(true),
|
||||
|
@ -550,7 +551,6 @@ public:
|
|||
mBlitFramebuffer(0),
|
||||
mOffscreenDrawFBO(0),
|
||||
mOffscreenReadFBO(0),
|
||||
mOffscreenFBOsDirty(false),
|
||||
mOffscreenColorRB(0),
|
||||
mOffscreenDepthRB(0),
|
||||
mOffscreenStencilRB(0)
|
||||
|
|
|
@ -581,8 +581,6 @@ GLContextProviderCGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
glContext->mOffscreenSize = aSize;
|
||||
glContext->mOffscreenActualSize = aSize;
|
||||
|
||||
printf("GL Offscreen: CGL+PBuffer\n");
|
||||
|
||||
return glContext.forget();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2251,38 +2251,32 @@ GLContextProviderEGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
if (!sEGLLibrary.EnsureInitialized()) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
ContextFormat actualFormat(aFormat);
|
||||
// actualFormat.samples = 0;
|
||||
|
||||
#if defined(ANDROID) || defined(XP_WIN)
|
||||
nsRefPtr<GLContextEGL> glContext =
|
||||
GLContextEGL::CreateEGLPBufferOffscreenContext(aSize, actualFormat);
|
||||
GLContextEGL::CreateEGLPBufferOffscreenContext(aSize, aFormat);
|
||||
|
||||
if (!glContext)
|
||||
return nsnull;
|
||||
|
||||
if (!glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), false))
|
||||
return nsnull;
|
||||
|
||||
printf("GL Offscreen: EGL+PBuffer\n");
|
||||
return glContext.forget();
|
||||
|
||||
return glContext.forget();
|
||||
#elif defined(MOZ_X11) && defined(MOZ_EGL_XRENDER_COMPOSITE)
|
||||
nsRefPtr<GLContextEGL> glContext =
|
||||
GLContextEGL::CreateBasicEGLPixmapOffscreenContext(aSize, actualFormat);
|
||||
GLContextEGL::CreateBasicEGLPixmapOffscreenContext(aSize, aFormat);
|
||||
|
||||
if (!glContext)
|
||||
return nsnull;
|
||||
|
||||
if (!glContext->ResizeOffscreenFBO(glContext->OffscreenActualSize(), true))
|
||||
return nsnull;
|
||||
|
||||
printf("GL Offscreen: EGL+Pixmap\n");
|
||||
|
||||
return glContext.forget();
|
||||
#elif defined(MOZ_X11)
|
||||
nsRefPtr<GLContextEGL> glContext =
|
||||
GLContextEGL::CreateEGLPixmapOffscreenContext(aSize, actualFormat, true);
|
||||
GLContextEGL::CreateEGLPixmapOffscreenContext(aSize, aFormat, true);
|
||||
|
||||
if (!glContext) {
|
||||
return nsnull;
|
||||
|
|
|
@ -1241,11 +1241,8 @@ already_AddRefed<GLContext>
|
|||
GLContextProviderGLX::CreateOffscreen(const gfxIntSize& aSize,
|
||||
const ContextFormat& aFormat)
|
||||
{
|
||||
ContextFormat actualFormat(aFormat);
|
||||
// actualFormat.samples = 0;
|
||||
|
||||
nsRefPtr<GLContextGLX> glContext =
|
||||
CreateOffscreenPixmapContext(aSize, actualFormat, true);
|
||||
CreateOffscreenPixmapContext(aSize, aFormat, true);
|
||||
|
||||
if (!glContext) {
|
||||
return nsnull;
|
||||
|
|
|
@ -650,9 +650,6 @@ GLContextProviderWGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
ContextFormat actualFormat(aFormat);
|
||||
// actualFormat.samples = 0;
|
||||
|
||||
nsRefPtr<GLContextWGL> glContext;
|
||||
|
||||
// Always try to create a pbuffer context first, because we
|
||||
|
@ -663,12 +660,12 @@ GLContextProviderWGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
sWGLLibrary.fCreatePbuffer &&
|
||||
sWGLLibrary.fChoosePixelFormat)
|
||||
{
|
||||
glContext = CreatePBufferOffscreenContext(aSize, actualFormat);
|
||||
glContext = CreatePBufferOffscreenContext(aSize, aFormat);
|
||||
}
|
||||
|
||||
// If it failed, then create a window context and use a FBO.
|
||||
if (!glContext) {
|
||||
glContext = CreateWindowOffscreenContext(actualFormat);
|
||||
glContext = CreateWindowOffscreenContext(aFormat);
|
||||
}
|
||||
|
||||
if (!glContext ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче