(AutomatedTests) Ensure warnings are shown as errors
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-native-image.h
index 2ba56a7..4a39cb1 100644 (file)
@@ -1,42 +1,43 @@
 #ifndef __TEST_NATIVE_IMAGE_H__
 #define __TEST_NATIVE_IMAGE_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * 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.
+ *
+ */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/images/native-image.h>
+#include <dali/public-api/images/native-image-interface.h>
 
 namespace Dali
 {
 class TestNativeImage;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
 
-class DALI_IMPORT_API TestNativeImage : public Dali::NativeImage
+class DALI_IMPORT_API TestNativeImage : public Dali::NativeImageInterface
 {
 public:
   static TestNativeImagePointer New(int width, int height);
 
-  inline virtual bool GlExtensionCreate() {return true;};
-  inline virtual void GlExtensionDestroy() {};
-  inline virtual GLenum TargetTexture() {return 1;};
+  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return true;};
+  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
   inline virtual void PrepareTexture() {};
   inline virtual unsigned int GetWidth() const {return mWidth;};
   inline virtual unsigned int GetHeight() const {return mHeight;};
-  inline virtual Pixel::Format GetPixelFormat() const {return Pixel::RGBA8888;};
+  inline virtual bool RequiresBlending() const {return true;};
 
 private:
   TestNativeImage(int width, int height);
@@ -44,6 +45,10 @@ private:
 
   int mWidth;
   int mHeight;
+public:
+  int mExtensionCreateCalls;
+  int mExtensionDestroyCalls;
+  int mTargetTextureCalls;
 };
 
 } // Dali