Fix Svace issue and add temp code to call pepper_output_finish_frame() 46/65946/1 accepted/tizen/common/20160414.142935 accepted/tizen/ivi/20160414.092315 accepted/tizen/mobile/20160414.092422 accepted/tizen/tv/20160414.092310 accepted/tizen/wearable/20160414.092303 submit/tizen/20160414.072105
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 14 Apr 2016 07:03:37 +0000 (16:03 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 14 Apr 2016 07:03:37 +0000 (16:03 +0900)
Change-Id: I3309f6344347c363e70a4da93aaa5e60b21b8a5c

pepper-dali/internal/input-impl.cpp
pepper-dali/internal/output-impl.cpp
pepper-dali/internal/output-impl.h
pepper-dali/internal/shell-client-impl.cpp
pepper-dali/internal/shell-client-impl.h
pepper-dali/internal/shell-impl.cpp

index 507163e..24a4ebe 100644 (file)
@@ -94,7 +94,7 @@ void Input::Initialize( Pepper::Compositor& compositor )
 
   /* create and add devices. */
   mDevice = pepper_input_device_create( static_cast< pepper_compositor_t* >( Pepper::GetImplementation( compositor ).GetCompositorHandle() ),
-                                        WL_SEAT_CAPABILITY_TOUCH, NULL, NULL );
+                                        WL_SEAT_CAPABILITY_KEYBOARD | WL_SEAT_CAPABILITY_TOUCH, NULL, NULL );
 //  mDevice = pepper_input_device_create( static_cast< pepper_compositor_t* >( Pepper::GetImplementation( compositor ).GetCompositorHandle() ),
 //                                        ( WL_SEAT_CAPABILITY_POINTER | WL_SEAT_CAPABILITY_KEYBOARD | WL_SEAT_CAPABILITY_TOUCH ), NULL, NULL );
   if( !mDevice )
index afc2986..b5b3d4f 100644 (file)
@@ -193,9 +193,18 @@ void Output::OnStartRepaintLoop( void* data )
 
 void Output::OnRepaint( void* data, const pepper_list_t* planeList )
 {
+  Output* output = static_cast< Output* >( data );
+
   DALI_LOG_INFO( gPepperOutputLogging, Debug::Verbose, "Output::OnRepaint\n" );
 
   // TODO: repaint
+  if( !output->mRenderFinishTimer )
+  {
+    output->mRenderFinishTimer= Timer::New(10);
+    output->mRenderFinishTimer.TickSignal().Connect( output, &Output::OnRenderFinishTimerTick );
+  }
+
+  output->mRenderFinishTimer.Start();
 }
 
 void Output::OnAttachSurface( void* data, pepper_surface_t* surface, int* width, int* height )
@@ -278,10 +287,24 @@ void Output::OnObjectViewDeleted( Pepper::Object object, Pepper::ObjectView obje
     if( *iter == object )
     {
       mObjectList.erase( iter );
+      break;
     }
   }
 }
 
+// TODO: temp
+bool Output::OnRenderFinishTimerTick()
+{
+  struct timespec ts;
+
+  DALI_LOG_INFO( gPepperOutputLogging, Debug::Verbose, "Output::OnRenderFinishTimerTick\n" );
+
+  pepper_compositor_get_time( static_cast< pepper_compositor_t* >( Pepper::GetImplementation( mCompositor ).GetCompositorHandle() ), &ts );
+  pepper_output_finish_frame( mOutput, &ts );
+
+  return false;
+}
+
 } // namespace Internal
 
 } // namespace Pepper
index 2c06a18..e1564cf 100644 (file)
@@ -29,6 +29,9 @@
 #include <dali/public-api/signals/connection-tracker.h>
 #include <pepper-output-backend.h>
 
+// TODO: temp
+#include <dali/public-api/adaptor-framework/timer.h>
+
 namespace Dali
 {
 
@@ -87,6 +90,9 @@ private:
   void OnObjectViewAdded( Pepper::Object object, Pepper::ObjectView objectView );
   void OnObjectViewDeleted( Pepper::Object object, Pepper::ObjectView objectView );
 
+  // TODO: temp
+  bool OnRenderFinishTimerTick();
+
 private:
 
   // Undefined
@@ -110,6 +116,9 @@ private: // Data
   // Signals
   Pepper::Output::OutputSignalType mObjectViewAddedSignal;
   Pepper::Output::OutputSignalType mObjectViewDeletedSignal;
+
+  // TODO: temp
+  Timer mRenderFinishTimer;
 };
 
 } // namespace Internal
index 865b002..33ff32d 100644 (file)
@@ -302,22 +302,22 @@ void ShellClient::GetSurface( wl_client* client, unsigned int id, wl_resource* s
   DALI_LOG_INFO( gPepperShellClientLogging, Debug::Verbose, "ShellClient::GetSurface: success. surface = %p\n", mSurface );
 }
 
-void ShellClient::SetTitle( const std::string title )
+void ShellClient::SetTitle( const std::string& title )
 {
   mTitle = title;
 }
 
-std::string ShellClient::GetTitle() const
+const std::string& ShellClient::GetTitle() const
 {
   return mTitle;
 }
 
-void ShellClient::SetAppId( const std::string appId )
+void ShellClient::SetAppId( const std::string& appId )
 {
   mAppId = appId;
 }
 
-std::string ShellClient::GetAppId() const
+const std::string& ShellClient::GetAppId() const
 {
   return mAppId;
 }
@@ -338,7 +338,7 @@ void ShellClient::SurfaceResourceDestroy( struct wl_resource* resource )
     shellClient->mAppId.clear();
   }
 
-  if( !shellClient->mSurface )
+  if( shellClient->mSurface )
   {
     pepper_object_set_user_data( reinterpret_cast< pepper_object_t* >( shellClient->mSurface ), pepper_surface_get_role( shellClient->mSurface ), NULL, NULL );
   }
index f414675..273c2b2 100644 (file)
@@ -53,11 +53,11 @@ public:
   pepper_view_t* GetView();
   void GetSurface( wl_client* client, unsigned int id, wl_resource* surfaceResource );
 
-  void SetTitle( const std::string title );
-  std::string GetTitle() const;
+  void SetTitle( const std::string& title );
+  const std::string& GetTitle() const;
 
-  void SetAppId( const std::string appId );
-  std::string GetAppId() const;
+  void SetAppId( const std::string& appId );
+  const std::string& GetAppId() const;
 
 private:
 
index 49875ce..7dde360 100644 (file)
@@ -112,6 +112,7 @@ void Shell::OnClientDestroyed( Pepper::ShellClient shellClient )
     if( *iter == shellClient )
     {
       mShellClientList.erase( iter );
+      break;
     }
   }