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=1f5597700a4c0a2925a398ff1897ec5b590cebc8;hb=5a2a5883422f4d114902ac57d57d7d1e973fbb2e;hpb=fc3b9f75eedc1e29b78507d170a7dccd13784178 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 1f55977..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 @@ -1,8 +1,8 @@ -#ifndef __TEST_GL_ABSTRACTION_H__ -#define __TEST_GL_ABSTRACTION_H__ +#ifndef TEST_GL_ABSTRACTION_H +#define TEST_GL_ABSTRACTION_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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 { @@ -468,6 +470,12 @@ public: inline void DepthMask(GLboolean flag) { + mLastDepthMask = flag; + } + + inline bool GetLastDepthMask() const + { + return mLastDepthMask; } inline void DepthRangef(GLclampf zNear, GLclampf zFar) @@ -950,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 { @@ -2059,6 +2068,8 @@ private: GLenum mLastBlendFuncSrcAlpha; GLenum mLastBlendFuncDstAlpha; + GLboolean mLastDepthMask; + // Data for manipulating the IDs returned by GenTextures GLuint mLastAutoTextureIdUsed; std::vector mNextTextureIds; @@ -2123,7 +2134,7 @@ private: T uniformValue; if ( GetUniformValue( program, uniform, uniformValue ) ) { - return value == uniformValue; + return CompareType(value, uniformValue, Math::MACHINE_EPSILON_10); } return false; @@ -2167,6 +2178,9 @@ private: ProgramUniformValue mProgramUniformsMat4; ProgramUniformValue mProgramUniformsMat3; + + + inline const ProgramUniformValue& GetProgramUniformsForType( const int ) const { return mProgramUniforms1i; @@ -2258,6 +2272,4 @@ bool BlendEnabled(const Dali::TraceCallStack& callStack); bool BlendDisabled(const Dali::TraceCallStack& callStack); - - -#endif // __TEST_GL_ES_H__ +#endif // TEST_GL_ABSTRACTION_H