зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1324598 - GENERATE_MIPMAP_HINT isn't queriable in Core Profiles. - r=daoshengmu
MozReview-Commit-ID: 6Z2MPmeFqv
This commit is contained in:
Родитель
92e6e5b4d4
Коммит
f7b2bc6226
|
@ -974,6 +974,7 @@ private:
|
|||
realGLboolean mScissorTestEnabled;
|
||||
realGLboolean mDepthTestEnabled;
|
||||
realGLboolean mStencilTestEnabled;
|
||||
GLenum mGenerateMipmapHint;
|
||||
|
||||
bool ValidateCapabilityEnum(GLenum cap, const char* info);
|
||||
realGLboolean* GetStateTrackingSlot(GLenum cap);
|
||||
|
|
|
@ -947,6 +947,8 @@ WebGLContext::Hint(GLenum target, GLenum mode)
|
|||
|
||||
switch (target) {
|
||||
case LOCAL_GL_GENERATE_MIPMAP_HINT:
|
||||
mGenerateMipmapHint = mode;
|
||||
|
||||
// Deprecated and removed in desktop GL Core profiles.
|
||||
if (gl->IsCoreProfile())
|
||||
return;
|
||||
|
|
|
@ -386,12 +386,15 @@ WebGLContext::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv)
|
|||
case LOCAL_GL_BLEND_DST_RGB:
|
||||
case LOCAL_GL_BLEND_DST_ALPHA:
|
||||
case LOCAL_GL_BLEND_EQUATION_RGB:
|
||||
case LOCAL_GL_BLEND_EQUATION_ALPHA:
|
||||
case LOCAL_GL_GENERATE_MIPMAP_HINT: {
|
||||
case LOCAL_GL_BLEND_EQUATION_ALPHA: {
|
||||
GLint i = 0;
|
||||
gl->fGetIntegerv(pname, &i);
|
||||
return JS::NumberValue(uint32_t(i));
|
||||
}
|
||||
|
||||
case LOCAL_GL_GENERATE_MIPMAP_HINT:
|
||||
return JS::NumberValue(mGenerateMipmapHint);
|
||||
|
||||
case LOCAL_GL_IMPLEMENTATION_COLOR_READ_TYPE: {
|
||||
const webgl::FormatUsageInfo* usage;
|
||||
uint32_t width, height;
|
||||
|
|
|
@ -501,6 +501,7 @@ WebGLContext::InitAndValidateGL(FailureReason* const out_failReason)
|
|||
mDitherEnabled = true;
|
||||
mRasterizerDiscardEnabled = false;
|
||||
mScissorTestEnabled = false;
|
||||
mGenerateMipmapHint = LOCAL_GL_DONT_CARE;
|
||||
|
||||
// Bindings, etc.
|
||||
mActiveTexture = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче