Fix various SVACE errors 06/98006/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 15 Nov 2016 15:35:00 +0000 (15:35 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 15 Nov 2016 15:36:34 +0000 (15:36 +0000)
Change-Id: Iae0e1b6b7707e1060060de112f7831119bb86641

15 files changed:
adaptors/base/combined-update-render/combined-update-render-controller.cpp
adaptors/base/performance-logging/performance-server.cpp
adaptors/base/performance-logging/statistics/stat-context-manager.h
adaptors/base/separate-update-render/vsync-notifier.cpp
adaptors/devel-api/adaptor-framework/application-extensions.cpp
adaptors/ecore/common/ecore-indicator-impl.cpp
adaptors/ecore/common/ecore-server-connection.h
adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp
adaptors/x11/native-image-source-impl-x.cpp
adaptors/x11/window-render-surface-x.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-sync-abstraction.h
platform-abstractions/tizen/image-loaders/loader-astc.cpp
platform-abstractions/tizen/image-loaders/loader-bmp.cpp
platform-abstractions/tizen/resource-loader/resource-loader.cpp
platform-abstractions/tizen/tizen-platform-abstraction.h

index a1496db..26af651 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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.
@@ -105,6 +105,7 @@ CombinedUpdateRenderController::CombinedUpdateRenderController( AdaptorInternalS
   mDestroyUpdateRenderThread( FALSE ),
   mUpdateRenderThreadCanSleep( FALSE ),
   mPendingRequestUpdate( FALSE ),
+  mUseElapsedTimeAfterWait( FALSE ),
   mNewSurface( NULL ),
   mPostRendering( FALSE )
 {
index 2c3512c..d6e68fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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,12 +45,14 @@ PerformanceServer::PerformanceServer( AdaptorInternalServices& adaptorServices,
 : mEnvironmentOptions( environmentOptions ),
   mKernelTrace( adaptorServices.GetKernelTraceInterface() ),
   mSystemTrace( adaptorServices.GetSystemTraceInterface() ),
+  mLogMutex(),
 #if defined(NETWORK_LOGGING_ENABLED)
   mNetworkServer( adaptorServices, environmentOptions ),
   mNetworkControlEnabled( mEnvironmentOptions.GetNetworkControlMode()),
 #endif
   mStatContextManager( *this ),
   mStatisticsLogBitmask( 0 ),
+  mPerformanceOutputBitmask( 0 ),
   mLoggingEnabled( false ),
   mLogFunctionInstalled( false )
 {
index 35308d2..9e9abe1 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_ADAPTOR_STAT_CONTEXT_MANAGER_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.
@@ -132,6 +132,9 @@ public:
 
   private:
 
+    StatContextManager( const StatContextManager& ); ///< Undefined
+    StatContextManager& operator=( const StatContextManager& ); ///< Undefined
+
     typedef Dali::Vector< StatContext* > StatContexts;
 
     /**
index dc407f8..7ea74b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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.
@@ -170,7 +170,8 @@ void VSyncNotifier::Run()
 
       timespec sleepTime;
       sleepTime.tv_sec = 0;
-      sleepTime.tv_nsec = sleepTimeInMicroseconds * 1000;
+      sleepTime.tv_nsec = sleepTimeInMicroseconds;
+      sleepTime.tv_nsec *= NANOSECONDS_PER_MICROSECOND;
       nanosleep( &sleepTime, NULL );
     }
     mThreadSynchronization.AddPerformanceMarker( PerformanceInterface::VSYNC );
index 582e659..e03b298 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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.
@@ -29,6 +29,7 @@ namespace Dali
 {
 
 ApplicationExtensions::ApplicationExtensions()
+: mApplication( NULL )
 {
 }
 
index 2e61d8f..f344e25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -541,6 +541,7 @@ bool Indicator::ScopedLock::IsLocked()
 
 Indicator::Indicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
 : mPixmap( 0 ),
+  mGestureDeltaY( 0.0f ),
   mGestureDetected( false ),
   mConnection( this ),
   mOpacityMode( Dali::Window::OPAQUE ),
@@ -1140,7 +1141,7 @@ bool Indicator::CopyToBuffer( int bufferNumber )
     else if( scopedLock.IsLocked() )
     {
       unsigned char *src = mSharedFileInfo[bufferNumber].mSharedFile->GetAddress();
-      size_t size = mSharedFileInfo[bufferNumber].mImageWidth * mSharedFileInfo[bufferNumber].mImageHeight * 4;
+      size_t size = static_cast< size_t >( mSharedFileInfo[bufferNumber].mImageWidth ) * mSharedFileInfo[bufferNumber].mImageHeight * 4;
 
       if( mIndicatorBuffer->UpdatePixels( src, size ) )
       {
@@ -1621,58 +1622,7 @@ void Indicator::OnAnimationFinished(Dali::Animation& animation)
 
 void Indicator::OnPan( Dali::Actor actor, const Dali::PanGesture& gesture )
 {
-  return ;
-
-  if( mServerConnection )
-  {
-    switch( gesture.state )
-    {
-      case Gesture::Started:
-      {
-        mGestureDetected = false;
-
-        // The gesture position is the current position after it has moved by the displacement.
-        // We want to reference the original position.
-        mGestureDeltaY = gesture.position.y - gesture.displacement.y;
-      }
-
-      // No break, Fall through
-      case Gesture::Continuing:
-      {
-        if( mVisible == Dali::Window::AUTO && !mIsShowing )
-        {
-          // Only take one touch point
-          if( gesture.numberOfTouches == 1 && mGestureDetected == false )
-          {
-            mGestureDeltaY += gesture.displacement.y;
-
-            if( mGestureDeltaY >= mImageHeight * SHOWING_DISTANCE_HEIGHT_RATE )
-            {
-              ShowIndicator( AUTO_INDICATOR_STAY_DURATION );
-              mGestureDetected = true;
-            }
-          }
-        }
-
-        break;
-      }
-
-      case Gesture::Finished:
-      case Gesture::Cancelled:
-      {
-        // if indicator is showing, hide again when touching is finished (Since touch leave is activated, checking it in gesture::finish instead of touch::up)
-        if( mVisible == Dali::Window::AUTO && mIsShowing )
-        {
-          ShowIndicator( AUTO_INDICATOR_STAY_DURATION );
-        }
-        break;
-      }
-
-
-      default:
-        break;
-    }
-  }
+  // Nothing to do, but we still want to consume pan
 }
 
 void Indicator::OnStageTouched(const Dali::TouchEvent& touchEvent)
index 72941b9..d81cdfe 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_ADAPTOR_ECORE_SERVER_CONNECTION_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.
@@ -118,6 +118,10 @@ private: // Class callbacks
   static Eina_Bool IpcServerData(void *data, int type, void *event);
 
 private:
+
+  ServerConnection( const ServerConnection& ); ///< Undefined
+  ServerConnection& operator=( const ServerConnection& ); ///< Undefined
+
   void CloseConnection();
 
 private:
index da42e93..0d0609a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -50,6 +50,7 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
                                           const std::string& name,
                                           bool isTransparent)
 : EcoreWlRenderSurface( positionSize, surface, name, isTransparent ),
+  mWlWindow( NULL ),
   mEglWindow( NULL ),
   mNeedToApproveDeiconify( false )
 {
index ef0007e..779b03a 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -211,7 +211,7 @@ bool NativeImageSource::GetPixels(std::vector<unsigned char>& pixbuf, unsigned&
           pixbuf.resize(width*height*4);
           unsigned * bufPtr = reinterpret_cast<unsigned *>(&pixbuf[0]);
           const unsigned xDataLineSkip = pXImage->bytes_per_line;
-          const size_t copy_count = width * 4;
+          const size_t copy_count = static_cast< size_t >( width ) * 4;
           pixelFormat = Pixel::BGRA8888;
 
           for(unsigned y = height-1; y < height; --y, bufPtr += width)
index 0580f54..d85c9c8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -59,6 +59,7 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
                                           const std::string& className,
                                           bool isTransparent)
 : EcoreXRenderSurface( positionSize, surface, name, isTransparent ),
+  mX11Window( 0 ),
   mNeedToApproveDeiconify(false),
   mClassName(className)
 {
index 278bcd7..8ce96a4 100644 (file)
@@ -2,7 +2,7 @@
 #define __TEST_GL_SYNC_ABSTRACTION_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.
@@ -108,6 +108,10 @@ public: // TEST FUNCTIONS
   int GetNumberOfSyncObjects();
 
 private:
+
+  TestGlSyncAbstraction( const TestGlSyncAbstraction& ); ///< Undefined
+  TestGlSyncAbstraction& operator=( const TestGlSyncAbstraction& ); ///< Undefined
+
   typedef std::vector<TestSyncObject*>   SyncContainer;
   typedef SyncContainer::iterator SyncIter;
   SyncContainer mSyncObjects;  ///< The sync objects
index 5d3e758..67b1ff5 100755 (executable)
@@ -215,7 +215,7 @@ bool LoadBitmapFromAstc( const ResourceLoadingClient& client, const ImageLoader:
   size_t imageByteCount = fileSize - sizeof( AstcFileHeader );
 
   // Sanity-check the image data is not too large and that it is at less than 2 bytes per texel:
-  if( ( imageByteCount > MAX_IMAGE_DATA_SIZE ) || ( imageByteCount > ( ( width * height ) << 1 ) ) )
+  if( ( imageByteCount > MAX_IMAGE_DATA_SIZE ) || ( imageByteCount > ( ( static_cast< size_t >( width ) * height ) << 1 ) ) )
   {
     DALI_LOG_ERROR( "ASTC file has too large image-data field.\n" );
     return false;
index 2219b31..f1ddcbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -578,7 +578,7 @@ bool DecodeRGB1(FILE *fp,
     }
     for(unsigned int j = 0; j < fillw; j ++)
     {
-      int ctIndex = 0;
+      unsigned int ctIndex = 0;
       if((fillw * index + j ) < (fillw * height))
       {
         ctIndex = colorIndex[ fillw * index + j ];
@@ -648,7 +648,7 @@ bool DecodeRGB4(FILE *fp,
     colorIndex[i] = cmd >> 4;
     colorIndex[i + 1] = cmd & (0x0F);
   }
-  int ctIndex = 0;
+  unsigned int ctIndex = 0;
 
   for(unsigned int index = 0; index < height; index = index + 1)
   {
@@ -722,7 +722,7 @@ bool DecodeRGB8(FILE *fp,
 
     colorIndex[i] = cmd;
   }
-  int ctIndex = 0;
+  unsigned int ctIndex = 0;
   for(unsigned int index = 0; index < height; index = index + 1)
   {
     PixelBuffer *pixelsPtr = NULL;
@@ -776,10 +776,10 @@ bool DecodeRLE4(FILE *fp,
   char colorTable[64];
   std::vector<char> colorIndex(width * height >> 1);
   std::vector<char> run;
-  int x = 0;
-  int y = 0;
-  int dx = 0;
-  int dy = 0;
+  unsigned int x = 0;
+  unsigned int y = 0;
+  unsigned int dx = 0;
+  unsigned int dy = 0;
   width += (width & 1);
   width = width >> 1;
 
@@ -938,8 +938,8 @@ bool DecodeRLE8(FILE *fp,
     return false;
   }
   PixelBuffer *pixelsPtr = pixels;
-  int x = 0;
-  int y = 0;
+  unsigned int x = 0;
+  unsigned int y = 0;
   unsigned int cmdStride = 2;
 
   width = ((width & 3) != 0) ? width + 4 - (width & 3) : width;
@@ -958,8 +958,8 @@ bool DecodeRLE8(FILE *fp,
     return false;
   }
 
-  int dx = 0;
-  int dy = 0;
+  unsigned int dx = 0;
+  unsigned int dy = 0;
   bool finish = false;
   unsigned int length = 0;
   unsigned int copylength = 0;
index a0e3fcf..967d2d9 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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.
@@ -242,6 +242,11 @@ struct ResourceLoader::ResourceLoaderImpl
       mStoredRequests.erase( iter );
     }
   }
+
+private:
+
+  ResourceLoaderImpl( const ResourceLoaderImpl& ); ///< Undefined
+  ResourceLoaderImpl& operator=( const ResourceLoaderImpl& ); ///< Undefined
 };
 
 /********************************************************************************/
index fdad62e..949c77f 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TIZEN_PLATFORM_ABSTRACTION_H__
 
 /*
- * Copyright (c) 2015 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.
@@ -147,6 +147,10 @@ public: // PlatformAbstraction overrides
   void SetDataStoragePath( const std::string& path );
 
 private:
+
+  TizenPlatformAbstraction( const TizenPlatformAbstraction& ); ///< Undefined
+  TizenPlatformAbstraction& operator=( const TizenPlatformAbstraction& ); ///< Undefined
+
   ResourceLoader* mResourceLoader;
   std::string mDataStoragePath;
 };