Bug 1313584 - Add complete parameters handling for SamplerParameterX to cover test need. r=mtseng
authorvincentliu <vliu@mozilla.com>
Mon, 07 Nov 2016 10:22:31 +0800
changeset 348059 bd64f2ee2d83416063756383053225cd0004be3f
parent 348058 61cf0a1a5186ae72d46d468ccb25492b1cb71734
child 348060 48942d5a145affedf326c9f6a34066615f422405
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng
bugs1313584
milestone52.0a1
Bug 1313584 - Add complete parameters handling for SamplerParameterX to cover test need. r=mtseng
dom/canvas/WebGLSampler.cpp
--- a/dom/canvas/WebGLSampler.cpp
+++ b/dom/canvas/WebGLSampler.cpp
@@ -80,16 +80,24 @@ WebGLSampler::SamplerParameter1i(GLenum 
     case LOCAL_GL_TEXTURE_COMPARE_MODE:
         mCompareMode = param;
         break;
 
     case LOCAL_GL_TEXTURE_COMPARE_FUNC:
         mCompareFunc = param;
         break;
 
+    case LOCAL_GL_TEXTURE_MIN_LOD:
+        mMinLod = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_MAX_LOD:
+        mMaxLod = param;
+        break;
+
     default:
         MOZ_CRASH("GFX: Unhandled pname");
         break;
     }
 
     for (uint32_t i = 0; i < mContext->mBoundSamplers.Length(); ++i) {
         if (this == mContext->mBoundSamplers[i])
             mContext->InvalidateResolveCacheForTextureWithTexUnit(i);
@@ -103,16 +111,44 @@ WebGLSampler::SamplerParameter1f(GLenum 
     case LOCAL_GL_TEXTURE_MIN_LOD:
         mMinLod = param;
         break;
 
     case LOCAL_GL_TEXTURE_MAX_LOD:
         mMaxLod = param;
         break;
 
+    case LOCAL_GL_TEXTURE_WRAP_S:
+        mWrapS = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_WRAP_T:
+        mWrapT = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_WRAP_R:
+        mWrapR = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_MAG_FILTER:
+        mMagFilter = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_MIN_FILTER:
+        mMinFilter = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_COMPARE_MODE:
+        mCompareMode = param;
+        break;
+
+    case LOCAL_GL_TEXTURE_COMPARE_FUNC:
+        mCompareFunc = param;
+        break;
+
     default:
         MOZ_CRASH("GFX: Unhandled pname");
         break;
     }
 
     for (uint32_t i = 0; i < mContext->mBoundSamplers.Length(); ++i) {
         if (this == mContext->mBoundSamplers[i])
             mContext->InvalidateResolveCacheForTextureWithTexUnit(i);