Revert "[3.0] NativeImageSource with tbm_surface for tizen 3.0 wayland" 24/60124/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 23 Feb 2016 12:56:44 +0000 (21:56 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 23 Feb 2016 12:57:12 +0000 (21:57 +0900)
This reverts commit 9e9b06befca53bf0fb7320f1db3eb704bae610a7.

Change-Id: I713bf7d51f02a8cfd701e50927f21bc141646d04

automated-tests/src/dali/dali-test-suite-utils/test-native-image.cpp
automated-tests/src/dali/dali-test-suite-utils/test-native-image.h
automated-tests/src/dali/utc-Dali-NativeImage.cpp
dali/devel-api/file.list
dali/devel-api/images/native-image-interface-extension.h [deleted file]
dali/integration-api/gl-defines.h
dali/internal/event/images/native-image-impl.cpp
dali/internal/event/images/native-image-impl.h
dali/public-api/images/native-image.cpp
dali/public-api/images/native-image.h

index d8ad2ba..d143d35 100644 (file)
@@ -31,7 +31,6 @@ TestNativeImagePointer TestNativeImage::New(int width, int height)
 TestNativeImage::TestNativeImage(int width, int height)
 : mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0)
 {
-  mExtension = new TestNativeImageExtension();
 }
 
 TestNativeImage::~TestNativeImage()
index 8dc6431..4a39cb1 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
-#include <dali/devel-api/images/native-image-interface-extension.h>
 
 namespace Dali
 {
 class TestNativeImage;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
 
-class DALI_IMPORT_API TestNativeImageExtension: public Dali::NativeImageInterface::Extension
-{
-public:
-  inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
-  inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
-
-};
-
 class DALI_IMPORT_API TestNativeImage : public Dali::NativeImageInterface
 {
 public:
@@ -47,7 +38,6 @@ public:
   inline virtual unsigned int GetWidth() const {return mWidth;};
   inline virtual unsigned int GetHeight() const {return mHeight;};
   inline virtual bool RequiresBlending() const {return true;};
-  inline virtual Dali::NativeImageInterface::Extension* GetExtension() {return mExtension;}
 
 private:
   TestNativeImage(int width, int height);
@@ -59,7 +49,6 @@ public:
   int mExtensionCreateCalls;
   int mExtensionDestroyCalls;
   int mTargetTextureCalls;
-  TestNativeImageExtension* mExtension;
 };
 
 } // Dali
index 3dc7568..1f080a7 100644 (file)
@@ -208,29 +208,7 @@ int UtcDaliNativeImageExtensionP(void)
   TestNativeImagePointer testNativeImage = TestNativeImage::New( 16, 16 );
   DALI_TEST_CHECK( testNativeImage );
 
-  DALI_TEST_CHECK( NULL != testNativeImage->GetExtension() );
+  DALI_TEST_CHECK( NULL == testNativeImage->GetExtension() );
 
   END_TEST;
 }
-
-int UtcDaliNativeImageGetCustomFragmentPreFixP(void)
-{
-  TestApplication application;
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( 16, 16 );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-
-  const char* preFix = "#extension GL_OES_EGL_image_external:require\n";
-  DALI_TEST_EQUALS( nativeImage.GetCustomFragmentPreFix(), preFix, TEST_LOCATION );
-  END_TEST;
-}
-
-int UtcDaliNativeImageGetCustomSamplerTypenameP(void)
-{
-  TestApplication application;
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( 16, 16 );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-
-  const char* samplerTypename = "samplerExternalOES";
-  DALI_TEST_EQUALS( nativeImage.GetCustomSamplerTypename(), samplerTypename, TEST_LOCATION );
-  END_TEST;
-}
index 9631a2e..a277021 100644 (file)
@@ -41,8 +41,7 @@ devel_api_core_events_header_files = \
 devel_api_core_images_header_files = \
   $(devel_api_src_dir)/images/atlas.h \
   $(devel_api_src_dir)/images/distance-field.h \
-  $(devel_api_src_dir)/images/pixel-data.h \
-  $(devel_api_src_dir)/images/native-image-interface-extension.h
+  $(devel_api_src_dir)/images/pixel-data.h
 
 devel_api_core_object_header_files = \
   $(devel_api_src_dir)/object/property-buffer.h \
diff --git a/dali/devel-api/images/native-image-interface-extension.h b/dali/devel-api/images/native-image-interface-extension.h
deleted file mode 100644 (file)
index ca19c14..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_EXTENSION_H__
-#define __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_EXTENSION_H__
-
-/*
- * Copyright (c) 2015 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/images/native-image-interface.h>
-
-namespace Dali
-{
-
-/**
- * @brief Extension abstract interface to provide platform-specific support for handling image data.
- *
- */
-class NativeImageInterface::Extension
-{
-public:
-
-  class Extension2; ///< Forward declare future extension interface
-
-  /**
-   * @brief Get custom fragment prefix for rendering native image.
-   *
-   * @return Custom fragment prefix code as string.
-   */
-  virtual const char* GetCustomFragmentPreFix() = 0;
-
-  /**
-   * @brief Get custom sampler type name for rendering native image.
-   *
-   * @return Custom sampler type name.
-   */
-  virtual const char* GetCustomSamplerTypename() = 0;
-
-  /**
-   * @brief Retrieve the extension for the interface.
-   *
-   * @return Extension2 pointer if available, NULL otherwise
-   */
-  virtual Extension2* GetExtension2()
-  {
-    return NULL;
-  }
-
-protected:
-
-  /**
-   * @brief Destructor.
-   *
-   */
-  virtual ~Extension()
-  {
-  }
-
-};
-
-} // namespace Dali
-
-#endif // __DALI_INTEGRATION_NATIVE_IMAGE_INTERFACE_H__
index ccc0c4a..5af7acd 100644 (file)
 #endif
 
 
-/* GL_OES_EGL_image_external */
-#ifndef GL_TEXTURE_EXTERNAL_OES
-#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65
-#endif
-
-
 #endif // __DALI_INTERNAL_GL_DEFINES_H__
index 6f965cb..4043f91 100644 (file)
@@ -26,7 +26,6 @@
 #include <dali/internal/event/common/thread-local-storage.h>
 #include <dali/internal/event/resources/resource-client.h>
 #include <dali/internal/event/common/stage-impl.h>
-#include <dali/devel-api/images/native-image-interface-extension.h>
 
 using namespace Dali::Integration;
 
@@ -41,20 +40,14 @@ namespace
 TypeRegistration mType( typeid(Dali::NativeImage), typeid(Dali::Image), NULL );
 }
 
-NativeImage::NativeImage( NativeImageInterface& resourceData )
+NativeImage::NativeImage()
 : Image()
 {
-  NativeImageInterface::Extension* extension = resourceData.GetExtension();
-  if( extension != NULL )
-  {
-    mCustomFragmentPreFix = extension->GetCustomFragmentPreFix();
-    mCustomSamplerTypename = extension->GetCustomSamplerTypename();
-  }
 }
 
 NativeImagePtr NativeImage::New( NativeImageInterface& resourceData )
 {
-  NativeImagePtr image = new NativeImage( resourceData );
+  NativeImagePtr image = new NativeImage;
   image->Initialize();
 
   ResourceClient &resourceClient = ThreadLocalStorage::Get().GetResourceClient();
@@ -80,26 +73,6 @@ void NativeImage::CreateGlTexture()
   resourceClient.CreateGlTexture( GetResourceId() );
 }
 
-const char* NativeImage::GetCustomFragmentPreFix()
-{
-  if( mCustomFragmentPreFix.empty() )
-  {
-    return NULL;
-  }
-
-  return mCustomFragmentPreFix.c_str();
-}
-
-const char* NativeImage::GetCustomSamplerTypename()
-{
-  if( mCustomSamplerTypename.empty() )
-  {
-    return NULL;
-  }
-
-  return mCustomSamplerTypename.c_str();
-}
-
 } // namespace Internal
 
 } // namespace Dali
index ef580fb..0f1dfe4 100644 (file)
@@ -18,9 +18,6 @@
  *
  */
 
-// EXTERNAL INCLUDES
-#include <string>
-
 // INTERNAL INCLUDES
 #include <dali/public-api/images/native-image.h>
 #include <dali/internal/event/images/image-impl.h>
@@ -59,28 +56,12 @@ protected:
   /**
    * Constructor
    */
-  NativeImage( NativeImageInterface& nativeImageInterface );
+  NativeImage();
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
   virtual ~NativeImage();
-
-public:
-
-  /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomFragmentPreFix()
-   */
-  const char* GetCustomFragmentPreFix();
-
-  /**
-   * @copydoc Dali::NativeImageInterface::Extension::GetCustomSamplerTypename()
-   */
-  const char* GetCustomSamplerTypename();
-
-private:
-  std::string mCustomFragmentPreFix;
-  std::string mCustomSamplerTypename;
 };
 
 } // namespace Internal
index 81fae36..fd40713 100644 (file)
@@ -64,14 +64,4 @@ NativeImage NativeImage::DownCast( BaseHandle handle )
   return NativeImage( dynamic_cast<Internal::NativeImage*>( handle.GetObjectPtr()) );
 }
 
-const char* NativeImage::GetCustomSamplerTypename()
-{
-  return GetImplementation(*this).GetCustomSamplerTypename();
-}
-
-const char* NativeImage::GetCustomFragmentPreFix()
-{
-  return GetImplementation(*this).GetCustomFragmentPreFix();
-}
-
 } // namespace Dali
index 2ef665e..c6577f7 100644 (file)
@@ -99,24 +99,10 @@ public:
    * If handle points to a NativeImage object, the downcast produces valid handle.
    * If not, the returned handle is left unintialized.
    * @param[in] handle Handle to an object.
-   * @return Handle to a NativeImage or an uninitialized handle.
+   * @return handle to a NativeImage or an uninitialized handle.
    */
   static NativeImage DownCast( BaseHandle handle );
 
-  /**
-   * @brief Get custom fragment prefix for rendering a native image.
-   *
-   * @return String for custom fragment prefix
-   */
-  const char* GetCustomFragmentPreFix();
-
-  /**
-   * @brief Get custom sampler type name for rendering a native image.
-   *
-   * @return String for custom sampler type name
-   */
-  const char* GetCustomSamplerTypename();
-
 public: // Not intended for application developers
 
   explicit DALI_INTERNAL NativeImage( Internal::NativeImage* );