Micro-optimize some validation checks.

Prepares for caching hasMappedBuffer. Also inclines several checks for
faster speed.

Bug: angleproject:2746
Change-Id: I74f9408d7b41e245c3f58d367dd2cc8fbace4a7a
Reviewed-on: https://chromium-review.googlesource.com/1150762
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index 1489fd7..15cd8bc 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -1321,12 +1321,6 @@
     mInfoLog.reset();
 }
 
-bool Program::hasLinkedShaderStage(ShaderType shaderType) const
-{
-    ASSERT(shaderType != ShaderType::InvalidEnum);
-    return mState.mLinkedShaderStages[shaderType];
-}
-
 Error Program::loadBinary(const Context *context,
                           GLenum binaryFormat,
                           const void *binary,
@@ -2050,15 +2044,8 @@
     }
 }
 
-bool Program::validateSamplers(InfoLog *infoLog, const Caps &caps)
+bool Program::validateSamplersImpl(InfoLog *infoLog, const Caps &caps)
 {
-    // Skip cache if we're using an infolog, so we get the full error.
-    // Also skip the cache if the sample mapping has changed, or if we haven't ever validated.
-    if (infoLog == nullptr && mCachedValidateSamplersResult.valid())
-    {
-        return mCachedValidateSamplersResult.value();
-    }
-
     if (mTextureUnitTypesCache.empty())
     {
         mTextureUnitTypesCache.resize(caps.maxCombinedTextureImageUnits, TextureType::InvalidEnum);
@@ -2125,11 +2112,6 @@
     return mValidated;
 }
 
-GLuint Program::getActiveUniformBlockCount() const
-{
-    return static_cast<GLuint>(mState.mUniformBlocks.size());
-}
-
 GLuint Program::getActiveAtomicCounterBufferCount() const
 {
     return static_cast<GLuint>(mState.mAtomicCounterBuffers.size());