-GBS Builds
-==========
+T.O.C.
+======
-NON-SMACK Targets
------------------
+ 1. GBS Builds
+ 1.1. NON-SMACK Targets
+ 1.2. SMACK enabled Targets
+ 2. Building for Ubuntu desktop
+ 2.1. Minimum Requirements
+ 2.2. Building the Repository
-gbs build -A [TARGET_ARCH]
-SMACK enabled Targets
----------------------
-gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
+1. GBS Builds
+=============
+
+1.1. NON-SMACK Targets
+----------------------
+
+ gbs build -A [TARGET_ARCH]
+
+1.2. SMACK enabled Targets
+--------------------------
+
+ gbs build -A [TARGET_ARCH] --define "%enable_dali_smack_rules 1"
+
+
+
+2. Building for Ubuntu desktop
+==============================
+
+2.1. Minimum Requirements
+------------------------
+
+ - Ubuntu 14.04
+ - Environment created using dali_env script in dali-core repository
+
+2.2. Building the Repository
+----------------------------
+
+To build the repository enter the 'build/tizen' folder:
+
+ cd dali-toolkit/build/tizen
+
+Then run the following commands:
+
+ autoreconf --install
+ ./configure --prefix=$DESKTOP_PREFIX
+ make install -j8
+
#include <dali/public-api/dali-core.h>
#include <dali/integration-api/core.h>
#include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/gl-defines.h>
#include "test-trace-call-stack.h"
namespace Dali
mActiveTextures[ mActiveTextureUnit ].mBoundTextures.push_back( texture );
}
}
+
+ std::stringstream out;
+ out << target << ", " << texture;
+ mTextureTrace.PushCall("BindTexture", out.str());
}
inline void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
*(textures+i) = ++mLastAutoTextureIdUsed;
}
}
+
+ std::stringstream out;
+ for(int i=0; i<n; i++)
+ {
+ out << textures[i];
+ if(i<n-1)
+ {
+ out << ", ";
+ }
+ }
+ mTextureTrace.PushCall("GenTexture", out.str());
}
inline void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
}
}
+ inline std::string GetShaderSource(GLuint shader)
+ {
+ return mShaderSources[shader];
+ }
+
inline void StencilFunc(GLenum func, GLint ref, GLuint mask)
{
}
inline void TexParameterf(GLenum target, GLenum pname, GLfloat param)
{
+ std::stringstream out;
+ out << target << ", " << pname << ", " << param;
+ mTexParamaterTrace.PushCall("TexParameterf", out.str());
}
inline void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
{
+ std::stringstream out;
+ out << target << ", " << pname << ", " << params[0];
+ mTexParamaterTrace.PushCall("TexParameterfv", out.str());
}
inline void TexParameteri(GLenum target, GLenum pname, GLint param)
{
+ std::stringstream out;
+ out << target << ", " << pname << ", " << param;
+ mTexParamaterTrace.PushCall("TexParameteri", out.str());
}
inline void TexParameteriv(GLenum target, GLenum pname, const GLint* params)
{
+ std::stringstream out;
+ out << target << ", " << pname << ", " << params[0];
+ mTexParamaterTrace.PushCall("TexParameteriv", out.str());
}
inline void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels)
inline void ResetTextureCallStack() { mTextureTrace.Reset(); }
inline TraceCallStack& GetTextureTrace() { return mTextureTrace; }
+ //Methods for Texture verification
+ inline void EnableTexParameterCallTrace(bool enable) { mTexParamaterTrace.Enable(enable); }
+ inline void ResetTexParameterCallStack() { mTexParamaterTrace.Reset(); }
+ inline TraceCallStack& GetTexParameterTrace() { return mTexParamaterTrace; }
+
//Methods for Draw verification
inline void EnableDrawCallTrace(bool enable) { mDrawTrace.Enable(enable); }
inline void ResetDrawCallStack() { mDrawTrace.Reset(); }
TraceCallStack mCullFaceTrace;
TraceCallStack mShaderTrace;
TraceCallStack mTextureTrace;
+ TraceCallStack mTexParamaterTrace;
TraceCallStack mDrawTrace;
// Shaders & Uniforms
*/
void TestPlatformAbstraction::LoadResource(const Integration::ResourceRequest& request)
{
- mTrace.PushCall("LoadResource", "");
+ std::ostringstream out;
+ out << "Type:";
+ if( request.GetType()->id == Integration::ResourceText )
+ {
+ out << "Text";
+ }
+ else
+ {
+ out << request.GetType()->id;
+ }
+ out << ", Path: " << request.GetPath() << std::endl ;
+
+ mTrace.PushCall("LoadResource", out.str());
if(mRequest != NULL)
{
delete mRequest;
--- /dev/null
+#ifndef _TEST_TOUCH_UTILS_H_
+#define _TEST_TOUCH_UTILS_H_
+
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/public-api/actors/actor.h>
+
+namespace Dali
+{
+
+// Data for touch events
+struct TouchEventData
+{
+ TouchEventData()
+ : functorCalled(false),
+ receivedTouch(),
+ touchActor()
+ {
+ }
+
+ void Reset()
+ {
+ functorCalled = false;
+
+ receivedTouch.points.clear();
+ receivedTouch.time = 0;
+
+ touchActor = NULL;
+ }
+
+ bool functorCalled;
+ TouchEvent receivedTouch;
+ Actor touchActor;
+};
+
+// Functor that sets the data when called
+struct TouchEventDataFunctor
+{
+ TouchEventDataFunctor(TouchEventData& data) : touchEventData(data) { }
+
+ bool operator()(Actor actor, const TouchEvent& touch)
+ {
+ touchEventData.functorCalled = true;
+ touchEventData.touchActor = actor;
+ touchEventData.receivedTouch = touch;
+ return false;
+ }
+
+ // Generate a touch-event
+ Integration::TouchEvent GenerateSingleTouch( TouchPoint::State state, Vector2 screenPosition ) const
+ {
+ Integration::TouchEvent touchEvent;
+ touchEvent.points.push_back( TouchPoint ( 0, state, screenPosition.x, screenPosition.y ) );
+ return touchEvent;
+ }
+
+ TouchEventData& touchEventData;
+};
+
+
+} // namespace Dali
+
+#endif // _TEST_TOUCH_UTILS_H_
*/
void TraceCallStack::Enable(bool enable) { mTraceActive = enable; }
+bool TraceCallStack::IsEnabled() { return mTraceActive; }
+
/**
* Push a call onto the stack if the trace is active
* @param[in] method The name of the method
return found;
}
+int TraceCallStack::CountMethod(std::string method) const
+{
+ int numCalls = 0;
+ for( size_t i=0; i < mCallStack.size(); i++ )
+ {
+ if( 0 == mCallStack[i][0].compare(method) )
+ {
+ numCalls++;
+ }
+ }
+ return numCalls;
+}
+
+
/**
* Search for a method in the stack with the given parameter list
* @param[in] method The name of the method
*/
void Enable(bool enable);
+ bool IsEnabled();
+
/**
* Push a call onto the stack if the trace is active
* @param[in] method The name of the method
*/
bool FindMethod(std::string method) const;
+ /**
+ * Count how many times a method was called
+ * @param[in] method The name of the method
+ * @return The number of times it was called
+ */
+ int CountMethod(std::string method) const;
+
/**
* Search for a method in the stack with the given parameter list
* @param[in] method The name of the method
+++ /dev/null
-autoreconf --install
-./configure --prefix=$DESKTOP_PREFIX
-make install -j3