X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-gl-abstraction.h;h=1613bb527d4293adead73e42a5d4335348adab89;hp=10c326429ebe43375b6b0245deb5e5ba75aa6a08;hb=5a2a5883422f4d114902ac57d57d7d1e973fbb2e;hpb=3a727ff0ae4baf350511079f016aeaadd4b0faa9 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h index 10c3264..1613bb5 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.h @@ -25,13 +25,15 @@ #include #include #include // for strcmp +#include // INTERNAL INCLUDES #include #include #include #include -#include "test-trace-call-stack.h" +#include +#include namespace Dali { @@ -956,10 +958,11 @@ public: inline void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { const std::string shaderSource = mShaderSources[shader]; - if( static_cast(shaderSource.length()) < bufsize ) + const int shaderSourceLength = static_cast(shaderSource.length()); + if( shaderSourceLength < bufsize ) { - strcpy(source, shaderSource.c_str()); - *length = shaderSource.length(); + strncpy( source, shaderSource.c_str(), shaderSourceLength ); + *length = shaderSourceLength; } else { @@ -2131,7 +2134,7 @@ private: T uniformValue; if ( GetUniformValue( program, uniform, uniformValue ) ) { - return value == uniformValue; + return CompareType(value, uniformValue, Math::MACHINE_EPSILON_10); } return false; @@ -2175,6 +2178,9 @@ private: ProgramUniformValue mProgramUniformsMat4; ProgramUniformValue mProgramUniformsMat3; + + + inline const ProgramUniformValue& GetProgramUniformsForType( const int ) const { return mProgramUniforms1i;