Bug 1087560 - Build GetContextAttributes from mOptions. - r=kamidphish

This commit is contained in:
Jeff Gilbert 2014-10-24 18:09:18 -07:00
parent 8e05002568
commit 9fbdf15c41

View File

@ -1252,12 +1252,10 @@ WebGLContext::GetContextAttributes(Nullable<dom::WebGLContextAttributes> &retval
dom::WebGLContextAttributes& result = retval.SetValue();
const PixelBufferFormat& format = gl->GetPixelFormat();
result.mAlpha.Construct(format.alpha > 0);
result.mDepth = format.depth > 0;
result.mStencil = format.stencil > 0;
result.mAntialias = format.samples > 1;
result.mAlpha.Construct(mOptions.alpha);
result.mDepth = mOptions.depth;
result.mStencil = mOptions.stencil;
result.mAntialias = mOptions.antialias;
result.mPremultipliedAlpha = mOptions.premultipliedAlpha;
result.mPreserveDrawingBuffer = mOptions.preserveDrawingBuffer;
}