Add last clear color API in test gl abstraction.
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-gl-abstraction.cpp
index 02439bc..207d9a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
@@ -58,6 +58,7 @@ void TestGlAbstraction::Initialize()
 
   mLastShaderCompiled = 0;
   mLastClearBitMask = 0;
+  mLastClearColor = Color::TRANSPARENT;
   mClearCount = 0;
 
   mLastBlendEquationRgb   = 0;
@@ -104,6 +105,16 @@ void TestGlAbstraction::PostRender()
 {
 }
 
+bool TestGlAbstraction::IsSurfacelessContextSupported() const
+{
+  return true;
+}
+
+bool TestGlAbstraction::TextureRequiresConverting( const GLenum imageGlFormat, const GLenum textureGlFormat, const bool isSubImage ) const
+{
+  return ( ( imageGlFormat == GL_RGB ) && ( textureGlFormat == GL_RGBA ) );
+}
+
 } // Namespace dali
 
 bool BlendEnabled(const Dali::TraceCallStack& callStack)
@@ -121,3 +132,4 @@ bool BlendDisabled(const Dali::TraceCallStack& callStack)
   bool blendEnabled = callStack.FindMethodAndParams( "Disable", out.str() );
   return blendEnabled;
 }
+