mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1088345 - Handle AA better. - r=kamidphish
This commit is contained in:
parent
d8f1d4e920
commit
bf69677207
@ -3467,22 +3467,7 @@ protected:
|
||||
if (!IsOffscreenSizeAllowed(size))
|
||||
return false;
|
||||
|
||||
SurfaceCaps tryCaps = caps;
|
||||
if (tryCaps.antialias) {
|
||||
// AA path
|
||||
if (CreateScreenBufferImpl(size, tryCaps))
|
||||
return true;
|
||||
|
||||
NS_WARNING("CreateScreenBuffer failed to initialize an AA context! Falling back to no AA...");
|
||||
tryCaps.antialias = false;
|
||||
}
|
||||
MOZ_ASSERT(!tryCaps.antialias);
|
||||
|
||||
if (CreateScreenBufferImpl(size, tryCaps))
|
||||
return true;
|
||||
|
||||
NS_WARNING("CreateScreenBuffer failed to initialize non-AA context!");
|
||||
return false;
|
||||
return CreateScreenBufferImpl(size, caps);
|
||||
}
|
||||
|
||||
bool CreateScreenBufferImpl(const gfx::IntSize& size,
|
||||
@ -3629,6 +3614,9 @@ protected:
|
||||
|
||||
|
||||
public:
|
||||
GLsizei MaxSamples() const {
|
||||
return mMaxSamples;
|
||||
}
|
||||
|
||||
void fViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
|
||||
if (mViewportRect[0] == x &&
|
||||
|
@ -572,8 +572,12 @@ DrawBuffer::Create(GLContext* const gl,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (caps.antialias && formats.samples == 0)
|
||||
return false; // Can't create it
|
||||
if (caps.antialias) {
|
||||
if (formats.samples == 0)
|
||||
return false; // Can't create it.
|
||||
|
||||
MOZ_ASSERT(formats.samples <= gl->MaxSamples());
|
||||
}
|
||||
|
||||
GLuint colorMSRB = 0;
|
||||
GLuint depthRB = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user