X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fgl%2Fgl-proxy-implementation.h;h=e2c16405981f82dbca31f3b7cfb7c2b2dd240050;hb=391ad4127d328de9ef987c9a6cdeb0e93fe89dbb;hp=7c2a6ebb8b24c0a268599fd937175f38d7f42d99;hpb=a1b4a2e1ea91c608af2d3eea7e17fc05e3b6b798;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/common/gl/gl-proxy-implementation.h b/adaptors/common/gl/gl-proxy-implementation.h index 7c2a6eb..e2c1640 100644 --- a/adaptors/common/gl/gl-proxy-implementation.h +++ b/adaptors/common/gl/gl-proxy-implementation.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_GL_PROXY_IMPLEMENTATION_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. @@ -45,17 +45,17 @@ public: /** * Increment the counter for this frame */ - void Increment(); + void Increment(); /** * Reset the counter */ - void Reset(); + void Reset(); /** * Accumulate the count onto statistics */ - void Accumulate(); + void Accumulate(); /** * @return the description of the sampler @@ -82,14 +82,20 @@ public: */ float GetMax() const; + /** + * @return the current count + */ + uint64_t GetCount() const; + private: // Data const char* mDescription; - float mAccumulated; - float mAccumulatedSquare; + + uint64_t mAccumulatedSquare; + uint64_t mAccumulated; + uint64_t mNumSamples; float mMin; float mMax; - unsigned int mNumSamples; unsigned int mCurrentFrameCount; }; @@ -104,7 +110,7 @@ public: /** * Increment the counter */ - void Increment(); + void Increment(); /** * Decrement the counter @@ -144,7 +150,7 @@ public: * Constructor * @param environmentOptions to check how often to log results */ - GlProxyImplementation(EnvironmentOptions& environmentOptions); + GlProxyImplementation( EnvironmentOptions& environmentOptions ); /** * Virtual destructor @@ -164,13 +170,13 @@ public: /* OpenGL ES 2.0 API */ virtual void Clear( GLbitfield mask ); - virtual void GenBuffers (GLsizei n, GLuint* buffers); - virtual void DeleteBuffers (GLsizei n, const GLuint* buffers); + virtual void GenBuffers( GLsizei n, GLuint* buffers ); + virtual void DeleteBuffers( GLsizei n, const GLuint* buffers ); virtual void BindBuffer( GLenum target, GLuint buffer ); - virtual void GenTextures (GLsizei n, GLuint* textures); - virtual void DeleteTextures (GLsizei n, const GLuint* textures); - virtual void ActiveTexture(GLenum texture); + virtual void GenTextures( GLsizei n, GLuint* textures ); + virtual void DeleteTextures( GLsizei n, const GLuint* textures ); + virtual void ActiveTexture( GLenum texture ); virtual void BindTexture( GLenum target, GLuint texture ); virtual void DrawArrays( GLenum mode, GLint first, GLsizei count ); @@ -196,8 +202,8 @@ public: virtual void UniformMatrix3fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); virtual void UniformMatrix4fv( GLint location, GLsizei count, GLboolean transpose, const GLfloat* value ); - virtual GLuint CreateProgram (void); - virtual void DeleteProgram (GLuint program); + virtual GLuint CreateProgram( void ); + virtual void DeleteProgram( GLuint program ); virtual void UseProgram( GLuint program ); private: // Helpers @@ -222,8 +228,8 @@ private: // Data ObjectCounter mTextureCount; ObjectCounter mProgramCount; - int mFrameCount; - + int mCurrentFrameCount; + int mTotalFrameCount; }; } // namespace Adaptor