X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Ftizen%2Fecore-indicator-impl-tizen.cpp;h=660a669b27eaed8c2846266d78d87c8cee171d36;hb=8c538c12a9443057d476941467c302e0c1642beb;hp=2439aaca76c9b777733a3c7c201c6be3b24536f6;hpb=fd97b4b567d27bd6fbbbdcf0ac28001384737bab;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/tizen/ecore-indicator-impl-tizen.cpp b/adaptors/tizen/ecore-indicator-impl-tizen.cpp index 2439aac..660a669 100644 --- a/adaptors/tizen/ecore-indicator-impl-tizen.cpp +++ b/adaptors/tizen/ecore-indicator-impl-tizen.cpp @@ -289,7 +289,9 @@ struct IpcDataEvMouseOut } }; -static void UpdateIndicatorImage( void* data, struct tizen_remote_surface* remoteSurface, struct wl_buffer* buffer, uint32_t time ) +struct wl_buffer* preBuffer; + +static void OnUpdateIndicatorImage( void* data, struct tizen_remote_surface* remoteSurface, struct wl_buffer* buffer, uint32_t time ) { Dali::Internal::Adaptor::Indicator* indicator = static_cast< Dali::Internal::Adaptor::Indicator* >( data ); @@ -299,16 +301,23 @@ static void UpdateIndicatorImage( void* data, struct tizen_remote_surface* remot indicator->UpdateIndicatorImage( tbmSurface ); } + + if( preBuffer != NULL && tizen_remote_surface_get_version( remoteSurface ) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION ) + { + tizen_remote_surface_release( remoteSurface, preBuffer ); + } + + preBuffer = buffer; } -static void MissingIndicatorImage( void* data, struct tizen_remote_surface* surface ) +static void OnMissingIndicatorImage( void* data, struct tizen_remote_surface* surface ) { } static const struct tizen_remote_surface_listener remoteSurfaceCallback = { - UpdateIndicatorImage, - MissingIndicatorImage, + OnUpdateIndicatorImage, + OnMissingIndicatorImage, }; } // anonymous namespace @@ -1029,9 +1038,9 @@ void Indicator::SetupNativeIndicatorImage( Ecore_Ipc_Event_Server_Data *epcEvent EINA_INLIST_FOREACH(globals, global) { - if (!strcmp(global->interface, "tizen_remote_surface_manager")) + if ( !strcmp( global->interface, "tizen_remote_surface_manager" ) ) { - remoteSurfaceManager = ( struct tizen_remote_surface_manager* )wl_registry_bind(registry, global->id, &tizen_remote_surface_manager_interface, 1); + remoteSurfaceManager = ( struct tizen_remote_surface_manager* )wl_registry_bind( registry, global->id, &tizen_remote_surface_manager_interface, ( ( global->version < 2 )? global->version: 2 ) ); } } }