diff options
Diffstat (limited to 'gfx/layers')
-rw-r--r-- | gfx/layers/apz/public/IAPZCTreeManager.cpp | 10 | ||||
-rw-r--r-- | gfx/layers/apz/public/IAPZCTreeManager.h | 10 | ||||
-rw-r--r-- | gfx/layers/apz/src/APZCTreeManager.cpp | 15 | ||||
-rw-r--r-- | gfx/layers/moz.build | 32 |
4 files changed, 28 insertions, 39 deletions
diff --git a/gfx/layers/apz/public/IAPZCTreeManager.cpp b/gfx/layers/apz/public/IAPZCTreeManager.cpp index f60cb9c87f..9b4e746e5d 100644 --- a/gfx/layers/apz/public/IAPZCTreeManager.cpp +++ b/gfx/layers/apz/public/IAPZCTreeManager.cpp @@ -9,21 +9,11 @@ #include "InputData.h" // for InputData, etc #include "mozilla/EventStateManager.h" // for WheelPrefs #include "mozilla/layers/APZThreadUtils.h" // for AssertOnCompositorThread, etc -#include "mozilla/MouseEvents.h" // for WidgetMouseEvent #include "mozilla/TouchEvents.h" // for WidgetTouchEvent namespace mozilla { namespace layers { -static bool -WillHandleMouseEvent(const WidgetMouseEventBase& aEvent) -{ - return aEvent.mMessage == eMouseMove || - aEvent.mMessage == eMouseDown || - aEvent.mMessage == eMouseUp || - aEvent.mMessage == eDragEnd; -} - // Returns whether or not a wheel event action will be (or was) performed by // APZ. If this returns true, the event must not perform a synchronous // scroll. diff --git a/gfx/layers/apz/public/IAPZCTreeManager.h b/gfx/layers/apz/public/IAPZCTreeManager.h index f3cc37a716..2bd50fb986 100644 --- a/gfx/layers/apz/public/IAPZCTreeManager.h +++ b/gfx/layers/apz/public/IAPZCTreeManager.h @@ -11,6 +11,7 @@ #include "FrameMetrics.h" // for FrameMetrics, etc #include "mozilla/EventForwards.h" // for WidgetInputEvent, nsEventStatus #include "mozilla/layers/APZUtils.h" // for HitTestResult +#include "mozilla/MouseEvents.h" // for WidgetMouseEvent #include "nsTArrayForwardDeclare.h" // for nsTArray, nsTArray_Impl, etc #include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc #include "Units.h" // for CSSPoint, CSSRect, etc @@ -38,6 +39,15 @@ enum ZoomToRectBehavior : uint32_t { class AsyncDragMetrics; +static bool +WillHandleMouseEvent(const WidgetMouseEventBase& aEvent) +{ + return aEvent.mMessage == eMouseMove || + aEvent.mMessage == eMouseDown || + aEvent.mMessage == eMouseUp || + aEvent.mMessage == eDragEnd; +} + class IAPZCTreeManager { NS_INLINE_DECL_THREADSAFE_VIRTUAL_REFCOUNTING(IAPZCTreeManager) diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 297bf57fe2..c308754e5a 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -85,21 +85,6 @@ struct APZCTreeManager::TreeBuildingState { std::map<ScrollableLayerGuid, AsyncPanZoomController*> mApzcMap; }; -// Returns whether or not a wheel event action will be (or was) performed by -// APZ. If this returns true, the event must not perform a synchronous -// scroll. -// -// Even if this returns false, all wheel events in APZ-aware widgets must -// be sent through APZ so they are transformed correctly for TabParent. -static bool -WillHandleWheelEvent(WidgetWheelEvent* aEvent) -{ - return EventStateManager::WheelEventIsScrollAction(aEvent) && - (aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_LINE || - aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL || - aEvent->mDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PAGE); -} - class APZCTreeManager::CheckerboardFlushObserver : public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index be0c95ba20..1449c3477a 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -48,6 +48,8 @@ EXPORTS += [ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': SOURCES += [ 'D3D11ShareHandleImage.cpp', + ] + UNIFIED_SOURCES += [ 'D3D9SurfaceImage.cpp', 'IMFYCbCrImage.cpp', 'TextureDIB.cpp', @@ -64,7 +66,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': SOURCES += [ 'd3d11/CompositorD3D11.cpp', 'd3d11/ReadbackManagerD3D11.cpp', - 'd3d11/TextureD3D11.cpp', + ] + UNIFIED_SOURCES += [ 'd3d11/TextureD3D11.cpp', ] EXPORTS.gfxipc += [ @@ -208,14 +211,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'MacIOSurfaceHelpers.h', 'MacIOSurfaceImage.h', ] + UNIFIED_SOURCES += [ + 'opengl/GLManager.cpp', + ] SOURCES += [ 'ipc/ShadowLayerUtilsMac.cpp', 'MacIOSurfaceHelpers.cpp', 'MacIOSurfaceImage.cpp', - 'opengl/GLManager.cpp', ] -SOURCES += [ +UNIFIED_SOURCES += [ 'apz/public/IAPZCTreeManager.cpp', 'apz/src/APZCTreeManager.cpp', 'apz/src/AsyncPanZoomController.cpp', @@ -250,7 +255,6 @@ SOURCES += [ 'basic/BasicColorLayer.cpp', 'basic/BasicCompositor.cpp', 'basic/BasicContainerLayer.cpp', - 'basic/BasicImageLayer.cpp', 'basic/BasicImages.cpp', 'basic/BasicLayerManager.cpp', 'basic/BasicLayersImpl.cpp', @@ -299,7 +303,6 @@ SOURCES += [ 'Effects.cpp', 'FrameMetrics.cpp', 'GLImages.cpp', - 'ImageContainer.cpp', 'ImageDataSerializer.cpp', 'ImageLayers.cpp', 'ipc/APZChild.cpp', @@ -309,7 +312,9 @@ SOURCES += [ 'ipc/CompositableTransactionParent.cpp', 'ipc/CompositorBench.cpp', 'ipc/CompositorBridgeChild.cpp', + 'ipc/CompositorBridgeParent.cpp', 'ipc/CompositorThread.cpp', + 'ipc/CrossProcessCompositorBridgeParent.cpp', 'ipc/ImageBridgeChild.cpp', 'ipc/ImageBridgeParent.cpp', 'ipc/ImageContainerChild.cpp', @@ -327,12 +332,10 @@ SOURCES += [ 'ipc/SharedRGBImage.cpp', 'ipc/VideoBridgeChild.cpp', 'ipc/VideoBridgeParent.cpp', - 'Layers.cpp', 'LayerScope.cpp', 'LayersLogging.cpp', 'LayerSorter.cpp', 'LayersTypes.cpp', - 'LayerTreeInvalidation.cpp', 'opengl/CompositingRenderTargetOGL.cpp', 'opengl/CompositorOGL.cpp', 'opengl/GLBlitTextureImageHelper.cpp', @@ -340,7 +343,6 @@ SOURCES += [ 'opengl/TextureClientOGL.cpp', 'opengl/TextureHostOGL.cpp', 'opengl/TexturePoolOGL.cpp', - 'PersistentBufferProvider.cpp', 'protobuf/LayerScopePacket.pb.cc', 'ReadbackProcessor.cpp', 'RenderTrace.cpp', @@ -348,11 +350,13 @@ SOURCES += [ 'TextureWrapperImage.cpp', ] -# Implementation in CBP.cpp of things used in CPCBP.cpp -# EraseLayerState, UpdateIndirectTree and map<uint64_t, CompositorBridgeParent::LayerTreeState> -UNIFIED_SOURCES += [ - 'ipc/CompositorBridgeParent.cpp', - 'ipc/CrossProcessCompositorBridgeParent.cpp', +# Cannot be built unified +SOURCES += [ + 'basic/BasicImageLayer.cpp', + 'ImageContainer.cpp', + 'Layers.cpp', + 'LayerTreeInvalidation.cpp', + 'PersistentBufferProvider.cpp', ] # Disable RTTI in google protocol buffer @@ -420,6 +424,6 @@ if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wno-error=shadow'] if CONFIG['MOZ_ENABLE_SKIA']: - SOURCES += [ + UNIFIED_SOURCES += [ 'composite/PaintCounter.cpp', ] |