Skip to content

Commit

Permalink
Fixed build wit latest upstream gecko
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Jul 16, 2014
1 parent dcb23b9 commit c0fe21e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 25 deletions.
4 changes: 2 additions & 2 deletions embedding/embedlite/embedthread/EmbedContentController.cpp
Expand Up @@ -179,8 +179,8 @@ void EmbedContentController::DoRequestContentRepaint(const FrameMetrics& aFrameM
}

nsEventStatus
EmbedContentController::ReceiveInputEvent(const InputData& aEvent,
ScrollableLayerGuid* aOutTargetGuid)
EmbedContentController::ReceiveInputEvent(InputData& aEvent,
mozilla::layers::ScrollableLayerGuid* aOutTargetGuid)
{
if (!mAPZC) {
return nsEventStatus_eIgnore;
Expand Down
4 changes: 2 additions & 2 deletions embedding/embedlite/embedthread/EmbedContentController.h
Expand Up @@ -47,8 +47,8 @@ class EmbedContentController : public mozilla::layers::GeckoContentController
void TransformCoordinateToGecko(const mozilla::ScreenIntPoint& aPoint,
LayoutDeviceIntPoint* aRefPointOut);
void ContentReceivedTouch(const ScrollableLayerGuid& aGuid, bool aPreventDefault);
nsEventStatus ReceiveInputEvent(const InputData& aEvent,
ScrollableLayerGuid* aOutTargetGuid);
nsEventStatus ReceiveInputEvent(InputData& aEvent,
mozilla::layers::ScrollableLayerGuid* aOutTargetGuid);

mozilla::layers::APZCTreeManager* GetManager() { return mAPZC; }

Expand Down
8 changes: 4 additions & 4 deletions embedding/embedlite/embedthread/EmbedLiteCompositorParent.cpp
Expand Up @@ -93,14 +93,14 @@ EmbedLiteCompositorParent::PrepareOffscreen()
SurfaceStreamType streamType =
SurfaceStream::ChooseGLStreamType(SurfaceStream::OffMainThread,
screen->PreserveBuffer());
SurfaceFactory_GL* factory = nullptr;
if (context->GetContextType() == GLContextType::EGL && sEGLLibrary.HasKHRImageTexture2D()) {
SurfaceFactory* factory = nullptr;
if (context->GetContextType() == GLContextType::EGL) {
// [Basic/OGL Layers, OMTC] WebGL layer init.
factory = SurfaceFactory_EGLImage::Create(context, screen->Caps());
factory = SurfaceFactory_EGLImage::Create(context, screen->mCaps);
} else {
// [Basic Layers, OMTC] WebGL layer init.
// Well, this *should* work...
factory = new SurfaceFactory_GLTexture(context, nullptr, screen->Caps());
factory = new SurfaceFactory_GLTexture(context, nullptr, screen->mCaps);
}
if (factory) {
screen->Morph(factory, streamType);
Expand Down
3 changes: 1 addition & 2 deletions embedding/embedlite/embedthread/EmbedLiteViewThreadChild.cpp
Expand Up @@ -870,8 +870,7 @@ EmbedLiteViewThreadChild::RecvInputDataTouchEvent(const ScrollableLayerGuid& aGu
}
}
if (aData.mType == MultiTouchInput::MULTITOUCH_END ||
aData.mType == MultiTouchInput::MULTITOUCH_CANCEL ||
aData.mType == MultiTouchInput::MULTITOUCH_LEAVE) {
aData.mType == MultiTouchInput::MULTITOUCH_CANCEL) {
mDispatchSynthMouseEvents = true;
}
return true;
Expand Down
14 changes: 7 additions & 7 deletions embedding/embedlite/embedthread/EmbedLiteViewThreadParent.cpp
Expand Up @@ -602,11 +602,11 @@ EmbedLiteViewThreadParent::ScheduleRender()
}

NS_IMETHODIMP
EmbedLiteViewThreadParent::ReceiveInputEvent(const mozilla::InputData & aEvent)
EmbedLiteViewThreadParent::ReceiveInputEvent(const mozilla::InputData& aEvent)
{
if (mController->GetManager()) {
ScrollableLayerGuid guid;
mController->ReceiveInputEvent(aEvent, &guid);
mController->ReceiveInputEvent(const_cast<mozilla::InputData&>(aEvent), &guid);
if (aEvent.mInputType == MULTITOUCH_INPUT) {
const MultiTouchInput& multiTouchInput = aEvent.AsMultiTouchInput();
LayoutDeviceIntPoint lpt;
Expand Down Expand Up @@ -793,18 +793,18 @@ EmbedLiteViewThreadParent::GetPendingTexture(EmbedLiteRenderTarget* aContextWrap
DataSourceSurface* toUpload = nullptr;
GLuint textureHandle = 0;
GLuint textureTarget = 0;
if (sharedSurf->Type() == SharedSurfaceType::EGLImageShare) {
if (sharedSurf->mType == SharedSurfaceType::EGLImageShare) {
SharedSurface_EGLImage* eglImageSurf = SharedSurface_EGLImage::Cast(sharedSurf);
eglImageSurf->AcquireConsumerTexture(consumerContext, &textureHandle, &textureTarget);
if (!textureHandle) {
NS_WARNING("Failed to get texture handle, fallback to pixels?");
}
} else if (sharedSurf->Type() == SharedSurfaceType::GLTextureShare) {
} else if (sharedSurf->mType == SharedSurfaceType::GLTextureShare) {
SharedSurface_GLTexture* glTexSurf = SharedSurface_GLTexture::Cast(sharedSurf);
textureHandle = glTexSurf->ConsTexture(consumerContext);
textureTarget = glTexSurf->ConsTextureTarget();
NS_ASSERTION(textureHandle, "Failed to get texture handle, fallback to pixels?");
} else if (sharedSurf->Type() == SharedSurfaceType::Basic) {
} else if (sharedSurf->mType == SharedSurfaceType::Basic) {
toUpload = SharedSurface_Basic::Cast(sharedSurf)->GetData();
} else {
NS_ERROR("Unhandled Image type");
Expand Down Expand Up @@ -833,8 +833,8 @@ EmbedLiteViewThreadParent::GetPendingTexture(EmbedLiteRenderTarget* aContextWrap

NS_ASSERTION(textureHandle, "Failed to get texture handle from EGLImage, fallback to pixels?");

*width = sharedSurf->Size().width;
*height = sharedSurf->Size().height;
*width = sharedSurf->mSize.width;
*height = sharedSurf->mSize.height;
*textureID = textureHandle;
if (aTextureTarget) {
*aTextureTarget = textureTarget;
Expand Down
8 changes: 0 additions & 8 deletions embedding/embedlite/utils/TabChildHelper.cpp
Expand Up @@ -418,14 +418,6 @@ TabChildHelper::ConvertMutiTouchInputToEvent(const mozilla::MultiTouchInput& aDa
msg = NS_TOUCH_END;
break;
}
case MultiTouchInput::MULTITOUCH_ENTER: {
msg = NS_TOUCH_ENTER;
break;
}
case MultiTouchInput::MULTITOUCH_LEAVE: {
msg = NS_TOUCH_LEAVE;
break;
}
case MultiTouchInput::MULTITOUCH_CANCEL: {
msg = NS_TOUCH_CANCEL;
break;
Expand Down

0 comments on commit c0fe21e

Please sign in to comment.