{
__pAppWidgetFramePresenter->Draw();
}
-
- __pAppWidgetLayer->SetRenderEnabled(true);
}
}} // Tizen::Shell
void
PostRender(void* pData, Evas* pEvas, void* pEventInfo)
{
+ SysLog(NID_SHELL, "ENTER");
+
_AppWidgetLayer* pAppWidgetLayer = static_cast<_AppWidgetLayer*>(pData);
SysTryReturnVoidResult(NID_SHELL, pAppWidgetLayer, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
, __pRenderBuffer(null)
, __bufferSize(0)
, __pixmapId(-1)
- , __rendered(true)
{
}
Evas* pEvas = ecore_evas_get(pEcoreEvas.get());
SysTryReturn(NID_SHELL, pEvas, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
- evas_event_callback_add(pEvas, EVAS_CALLBACK_RENDER_POST, PostRender, this);
+// evas_event_callback_add(pEvas, EVAS_CALLBACK_RENDER_POST, PostRender, this);
unique_ptr<Evas_Object, _EvasObjectDeleter> pEvasObject(evas_object_rectangle_add(pEvas));
SysTryReturn(NID_SHELL, pEvasObject, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
void
_AppWidgetLayer::SetLayerBounds(const FloatRectangle& bounds)
{
- SetRenderEnabled(false);
-
__size = FloatDimension(bounds.width, bounds.height);
ecore_evas_resize(__pEcoreEvas.get(), __size.width, __size.height);
}
void
-_AppWidgetLayer::SetRenderEnabled(bool enable)
-{
- __rendered = enable;
-}
-
-void
_AppWidgetLayer::OnRendered(void)
{
- if (!__rendered)
- {
- SysLog(NID_SHELL, "do not sync");
- return;
- }
-
if (__pixmapId == -1)
{
__pixmapId = AcquirePixmap();
return 0;
}
+void
+_AppWidgetLayer::Flush(void)
+{
+ SysLog(NID_SHELL, "ENTER");
+
+ _EflLayer::Flush();
+
+ if (IsFlushNeeded())
+ {
+ OnRendered();
+ }
+}
}} // Tizen::Shell
void FreeCanvas(void* pCanvas);
int EventHandler(int eventType, double timestamp, double x, double y);
result SyncPixmap(const Tizen::Graphics::FloatDimension& size);
- void SetRenderEnabled(bool enable);
void OnRendered(void);
virtual result RegisterTouchEventListener(void);
private:
_AppWidgetLayer(const _AppWidgetLayer& rhs);
_AppWidgetLayer& operator =(const _AppWidgetLayer& rhs);
+ virtual void Flush(void);
protected:
bool __isReleased;
void* __pRenderBuffer;
int __bufferSize;
int __pixmapId;
- bool __rendered;
};
}} // Tizen::Shell
{
__pAppWidgetPopupPresenter->Draw();
}
-
- __pAppWidgetPopupLayer->SetRenderEnabled(true);
}
}} // Tizen::Shell
return __pBitmap.get();
}
+int
+_AppWidgetPopupView::GetPixmapId(void) const
+{
+ return __pixmap;
+}
+
void
_AppWidgetPopupView::SetPopupBounds(const FloatDimension& size)
{
evas_object_image_size_set(__pPixmapObject.get(), width, height);
evas_object_image_colorspace_set(__pPixmapObject.get(), EVAS_COLORSPACE_ARGB8888);
evas_object_image_alpha_set(__pPixmapObject.get(), EINA_TRUE);
+ evas_object_raise(__pPixmapObject.get());
evas_object_move(__pPixmapObject.get(), 0, 0);
evas_object_show(__pPixmapObject.get());
result AddAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener);
result RemoveAppWidgetPopupEventListener(const _IAppWidgetPopupViewEventListener& listener);
Tizen::Graphics::Bitmap* GetBitmap(void) const;
+ int GetPixmapId(void) const;
protected:
_AppWidgetPopupView(_AppWidgetView& appwidgetView);
void
_AppWidgetPopupViewPresenter::Draw(void)
{
+/*
+ if (__pAppWidgetPopupView->GetPixmapId() != -1)
+ {
+ return;
+ }
+*/
Bitmap* pBitmap = __pAppWidgetPopupView->GetBitmap();
SysTryReturnVoidResult(NID_SHELL, pBitmap, E_SYSTEM, "Bitmap is invalid.");
}
}
+int
+_AppWidgetView::GetPixmapId(void) const
+{
+ return __pixmap;
+}
+
livebox*
_AppWidgetView::GetNativeAppWidget(void) const
{
bool IsUpdated(void) const;
Tizen::Graphics::FloatDimension GetAnchorSize(void) const;
void CallProviderRemoved(void);
+ int GetPixmapId(void) const;
protected:
_AppWidgetView(void);
void
_AppWidgetViewPresenter::Draw(void)
{
+/*
+ if (__pAppWidgetView->GetPixmapId() != -1)
+ {
+ return;
+ }
+*/
Bitmap* pBitmap = __pAppWidgetView->GetBitmap();
bool imageDone = false;