Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[embedlite] Add ScheduleUpdate method for EmbedLiteView
  • Loading branch information
Raine Makelainen authored and rojkov committed May 19, 2015
1 parent eb25d67 commit 044ef5f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions embedding/embedlite/EmbedLiteView.cpp
Expand Up @@ -295,6 +295,13 @@ EmbedLiteView::SetScreenRotation(mozilla::ScreenRotation rotation)
mViewImpl->SetScreenRotation(rotation);
}

void
EmbedLiteView::ScheduleUpdate()
{
NS_ENSURE_TRUE(mViewImpl, );
mViewImpl->ScheduleUpdate();
}

void
EmbedLiteView::SuspendRendering()
{
Expand Down
1 change: 1 addition & 0 deletions embedding/embedlite/EmbedLiteView.h
Expand Up @@ -117,6 +117,7 @@ class EmbedLiteView

// Set screen rotation (orientation change).
virtual void SetScreenRotation(mozilla::ScreenRotation rotation);
virtual void ScheduleUpdate();

// Scripting Interface, allow to extend embedding API by creating
// child js scripts and messaging interface.
Expand Down
9 changes: 9 additions & 0 deletions embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp
Expand Up @@ -422,6 +422,15 @@ EmbedLiteViewBaseParent::SetScreenRotation(const mozilla::ScreenRotation& rotati
return NS_OK;
}

NS_IMETHODIMP
EmbedLiteViewBaseParent::ScheduleUpdate()
{
if (mCompositor) {
mCompositor->ScheduleRenderOnCompositorThread();
}
return NS_OK;
}

NS_IMETHODIMP
EmbedLiteViewBaseParent::ResumeRendering()
{
Expand Down
1 change: 1 addition & 0 deletions embedding/embedlite/embedshared/EmbedLiteViewIface.idl
Expand Up @@ -35,6 +35,7 @@ interface EmbedLiteViewIface
void SetViewSize(in int32_t aWidth, in int32_t aHeight);
void SetGLViewPortSize(in int32_t aWidth, in int32_t aHeight);
void SetScreenRotation([const] in ScreenRotation rotation);
void ScheduleUpdate();
void ReceiveInputEvent([const] in InputData aEvent);
void TextEvent(in string aComposite, in string aPreEdit);
void SendKeyPress(in int32_t aDomKeyCode, in int32_t aModifiers, in int32_t aCharCode);
Expand Down

0 comments on commit 044ef5f

Please sign in to comment.