| Index: cc/ShaderChromium.cpp
|
| diff --git a/cc/ShaderChromium.cpp b/cc/ShaderChromium.cpp
|
| index cf485c189ee61d8689414c4dd25de68d9832bc98..4138ab498db07b6feec0fac0ae429f0801278cf0 100644
|
| --- a/cc/ShaderChromium.cpp
|
| +++ b/cc/ShaderChromium.cpp
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "ShaderChromium.h"
|
|
|
| +#include "base/logging.h"
|
| #include <public/WebGraphicsContext3D.h>
|
| #include <wtf/StdLibExtras.h>
|
|
|
| @@ -23,7 +24,7 @@ namespace {
|
| static void getProgramUniformLocations(WebGraphicsContext3D* context, unsigned program, const char** shaderUniforms, size_t count, size_t maxLocations, int* locations, bool usingBindUniform, int* baseUniformIndex)
|
| {
|
| for (size_t uniformIndex = 0; uniformIndex < count; uniformIndex ++) {
|
| - ASSERT(uniformIndex < maxLocations);
|
| + DCHECK(uniformIndex < maxLocations);
|
|
|
| if (usingBindUniform) {
|
| locations[uniformIndex] = (*baseUniformIndex)++;
|
| @@ -50,7 +51,7 @@ void VertexShaderPosTex::init(WebGraphicsContext3D* context, unsigned program, b
|
| getProgramUniformLocations(context, program, shaderUniforms, WTF_ARRAY_LENGTH(shaderUniforms), WTF_ARRAY_LENGTH(locations), locations, usingBindUniform, baseUniformIndex);
|
|
|
| m_matrixLocation = locations[0];
|
| - ASSERT(m_matrixLocation != -1);
|
| + DCHECK(m_matrixLocation != -1);
|
| }
|
|
|
| std::string VertexShaderPosTex::getShaderString() const
|
| @@ -89,7 +90,7 @@ void VertexShaderPosTexYUVStretch::init(WebGraphicsContext3D* context, unsigned
|
| m_matrixLocation = locations[0];
|
| m_yWidthScaleFactorLocation = locations[1];
|
| m_uvWidthScaleFactorLocation = locations[2];
|
| - ASSERT(m_matrixLocation != -1 && m_yWidthScaleFactorLocation != -1 && m_uvWidthScaleFactorLocation != -1);
|
| + DCHECK(m_matrixLocation != -1 && m_yWidthScaleFactorLocation != -1 && m_uvWidthScaleFactorLocation != -1);
|
| }
|
|
|
| std::string VertexShaderPosTexYUVStretch::getShaderString() const
|
| @@ -127,7 +128,7 @@ void VertexShaderPos::init(WebGraphicsContext3D* context, unsigned program, bool
|
| getProgramUniformLocations(context, program, shaderUniforms, WTF_ARRAY_LENGTH(shaderUniforms), WTF_ARRAY_LENGTH(locations), locations, usingBindUniform, baseUniformIndex);
|
|
|
| m_matrixLocation = locations[0];
|
| - ASSERT(m_matrixLocation != -1);
|
| + DCHECK(m_matrixLocation != -1);
|
| }
|
|
|
| std::string VertexShaderPos::getShaderString() const
|
| @@ -160,7 +161,7 @@ void VertexShaderPosTexTransform::init(WebGraphicsContext3D* context, unsigned p
|
|
|
| m_matrixLocation = locations[0];
|
| m_texTransformLocation = locations[1];
|
| - ASSERT(m_matrixLocation != -1 && m_texTransformLocation != -1);
|
| + DCHECK(m_matrixLocation != -1 && m_texTransformLocation != -1);
|
| }
|
|
|
| std::string VertexShaderPosTexTransform::getShaderString() const
|
| @@ -210,7 +211,7 @@ void VertexShaderQuad::init(WebGraphicsContext3D* context, unsigned program, boo
|
|
|
| m_matrixLocation = locations[0];
|
| m_pointLocation = locations[1];
|
| - ASSERT(m_matrixLocation != -1 && m_pointLocation != -1);
|
| + DCHECK(m_matrixLocation != -1 && m_pointLocation != -1);
|
| }
|
|
|
| std::string VertexShaderQuad::getShaderString() const
|
| @@ -256,7 +257,7 @@ void VertexShaderTile::init(WebGraphicsContext3D* context, unsigned program, boo
|
| m_matrixLocation = locations[0];
|
| m_pointLocation = locations[1];
|
| m_vertexTexTransformLocation = locations[2];
|
| - ASSERT(m_matrixLocation != -1 && m_pointLocation != -1 && m_vertexTexTransformLocation != -1);
|
| + DCHECK(m_matrixLocation != -1 && m_pointLocation != -1 && m_vertexTexTransformLocation != -1);
|
| }
|
|
|
| std::string VertexShaderTile::getShaderString() const
|
| @@ -337,7 +338,7 @@ void FragmentTexAlphaBinding::init(WebGraphicsContext3D* context, unsigned progr
|
|
|
| m_samplerLocation = locations[0];
|
| m_alphaLocation = locations[1];
|
| - ASSERT(m_samplerLocation != -1 && m_alphaLocation != -1);
|
| + DCHECK(m_samplerLocation != -1 && m_alphaLocation != -1);
|
| }
|
|
|
| FragmentTexOpaqueBinding::FragmentTexOpaqueBinding()
|
| @@ -355,7 +356,7 @@ void FragmentTexOpaqueBinding::init(WebGraphicsContext3D* context, unsigned prog
|
| getProgramUniformLocations(context, program, shaderUniforms, WTF_ARRAY_LENGTH(shaderUniforms), WTF_ARRAY_LENGTH(locations), locations, usingBindUniform, baseUniformIndex);
|
|
|
| m_samplerLocation = locations[0];
|
| - ASSERT(m_samplerLocation != -1);
|
| + DCHECK(m_samplerLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderRGBATexFlipAlpha::getShaderString() const
|
| @@ -523,7 +524,7 @@ void FragmentShaderRGBATexAlphaAA::init(WebGraphicsContext3D* context, unsigned
|
| m_samplerLocation = locations[0];
|
| m_alphaLocation = locations[1];
|
| m_edgeLocation = locations[2];
|
| - ASSERT(m_samplerLocation != -1 && m_alphaLocation != -1 && m_edgeLocation != -1);
|
| + DCHECK(m_samplerLocation != -1 && m_alphaLocation != -1 && m_edgeLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderRGBATexAlphaAA::getShaderString() const
|
| @@ -575,7 +576,7 @@ void FragmentTexClampAlphaAABinding::init(WebGraphicsContext3D* context, unsigne
|
| m_alphaLocation = locations[1];
|
| m_fragmentTexTransformLocation = locations[2];
|
| m_edgeLocation = locations[3];
|
| - ASSERT(m_samplerLocation != -1 && m_alphaLocation != -1 && m_fragmentTexTransformLocation != -1 && m_edgeLocation != -1);
|
| + DCHECK(m_samplerLocation != -1 && m_alphaLocation != -1 && m_fragmentTexTransformLocation != -1 && m_edgeLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderRGBATexClampAlphaAA::getShaderString() const
|
| @@ -658,7 +659,7 @@ void FragmentShaderRGBATexAlphaMask::init(WebGraphicsContext3D* context, unsigne
|
| m_alphaLocation = locations[2];
|
| m_maskTexCoordScaleLocation = locations[3];
|
| m_maskTexCoordOffsetLocation = locations[4];
|
| - ASSERT(m_samplerLocation != -1 && m_maskSamplerLocation != -1 && m_alphaLocation != -1);
|
| + DCHECK(m_samplerLocation != -1 && m_maskSamplerLocation != -1 && m_alphaLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderRGBATexAlphaMask::getShaderString() const
|
| @@ -710,7 +711,7 @@ void FragmentShaderRGBATexAlphaMaskAA::init(WebGraphicsContext3D* context, unsig
|
| m_edgeLocation = locations[3];
|
| m_maskTexCoordScaleLocation = locations[4];
|
| m_maskTexCoordOffsetLocation = locations[5];
|
| - ASSERT(m_samplerLocation != -1 && m_maskSamplerLocation != -1 && m_alphaLocation != -1 && m_edgeLocation != -1);
|
| + DCHECK(m_samplerLocation != -1 && m_maskSamplerLocation != -1 && m_alphaLocation != -1 && m_edgeLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderRGBATexAlphaMaskAA::getShaderString() const
|
| @@ -774,7 +775,7 @@ void FragmentShaderYUVVideo::init(WebGraphicsContext3D* context, unsigned progra
|
| m_ccMatrixLocation = locations[4];
|
| m_yuvAdjLocation = locations[5];
|
|
|
| - ASSERT(m_yTextureLocation != -1 && m_uTextureLocation != -1 && m_vTextureLocation != -1
|
| + DCHECK(m_yTextureLocation != -1 && m_uTextureLocation != -1 && m_vTextureLocation != -1
|
| && m_alphaLocation != -1 && m_ccMatrixLocation != -1 && m_yuvAdjLocation != -1);
|
| }
|
|
|
| @@ -818,7 +819,7 @@ void FragmentShaderColor::init(WebGraphicsContext3D* context, unsigned program,
|
| getProgramUniformLocations(context, program, shaderUniforms, WTF_ARRAY_LENGTH(shaderUniforms), WTF_ARRAY_LENGTH(locations), locations, usingBindUniform, baseUniformIndex);
|
|
|
| m_colorLocation = locations[0];
|
| - ASSERT(m_colorLocation != -1);
|
| + DCHECK(m_colorLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderColor::getShaderString() const
|
| @@ -856,7 +857,7 @@ void FragmentShaderCheckerboard::init(WebGraphicsContext3D* context, unsigned pr
|
| m_texTransformLocation = locations[1];
|
| m_frequencyLocation = locations[2];
|
| m_colorLocation = locations[3];
|
| - ASSERT(m_alphaLocation != -1 && m_texTransformLocation != -1 && m_frequencyLocation != -1 && m_colorLocation != -1);
|
| + DCHECK(m_alphaLocation != -1 && m_texTransformLocation != -1 && m_frequencyLocation != -1 && m_colorLocation != -1);
|
| }
|
|
|
| std::string FragmentShaderCheckerboard::getShaderString() const
|
|
|