Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1490043002: Implementing Blink-side validation for WebGL 2 Samplers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed zmo@'s new feedback Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index b7ac1724db73a9900f6466729d0dc524219d334b..6031254747f8a4357bb107f7318e08837d1d2667 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -3222,4 +3222,16 @@ GLenum WebGL2RenderingContextBase::boundFramebufferColorFormat()
return GL_RGB;
}
+const WebGLSamplerState* WebGL2RenderingContextBase::getTextureUnitSamplerState(GLenum target, GLuint unit) const
+{
+ ASSERT(unit < m_samplerUnits.size());
+
+ WebGLSampler* sampler = m_samplerUnits[unit];
+
+ if (sampler)
+ return sampler->getSamplerState();
+
+ return WebGLRenderingContextBase::getTextureUnitSamplerState(target, unit);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698