Skip to content

Commit

Permalink
Fixed embedlite branch compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova authored and rojkov committed May 19, 2015
1 parent 7a5ccc5 commit d972c78
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions embedding/embedlite/EmbedLiteView.h
Expand Up @@ -71,6 +71,8 @@ class EmbedLiteViewListener
// Will be always called from the compositor thread.
virtual void DrawOverlay(const nsIntRect& aRect) {}

// Some GL Context implementations require Platform GL context to be active and valid
virtual bool RequestCurrentGLContext() { return false; }
};

class EmbedLiteApp;
Expand Down
Expand Up @@ -68,7 +68,7 @@ EmbedLiteViewBaseParent::SetCompositor(EmbedLiteCompositorParent* aCompositor)
UpdateScrollController();
if (mCompositor) {
if (mPendingRotation) {
mCompositor->SetScreenRotation(mRotation, mWorldTransform);
mCompositor->SetScreenRotation(mRotation);
mPendingRotation = false;
}
mCompositor->SetSurfaceSize(mGLViewPortSize.width, mGLViewPortSize.height);
Expand Down
12 changes: 6 additions & 6 deletions embedding/embedlite/embedthread/EmbedLiteCompositorParent.cpp
Expand Up @@ -252,18 +252,18 @@ void EmbedLiteCompositorParent::SetScreenRotation(const mozilla::ScreenRotation
switch (rotation) {
case mozilla::ROTATION_90:
// Pi / 2
rotationMartix.Rotate(M_PI_2l);
rotationMartix.Translate(0.0, -mLastViewSize.height);
rotationMartix.PreRotate(M_PI_2l);
rotationMartix.PreTranslate(0.0, -mLastViewSize.height);
break;
case mozilla::ROTATION_270:
// 3 / 2 * Pi
rotationMartix.Rotate(M_PI_2l * 3);
rotationMartix.Translate(-mLastViewSize.width, 0.0);
rotationMartix.PreRotate(M_PI_2l * 3);
rotationMartix.PreTranslate(-mLastViewSize.width, 0.0);
break;
case mozilla::ROTATION_180:
// Pi
rotationMartix.Rotate(M_PIl);
rotationMartix.Translate(-mLastViewSize.width, -mLastViewSize.height);
rotationMartix.PreRotate(M_PIl);
rotationMartix.PreTranslate(-mLastViewSize.width, -mLastViewSize.height);
break;
default:
break;
Expand Down

0 comments on commit d972c78

Please sign in to comment.