summaryrefslogtreecommitdiffstats
path: root/gfx/layers
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-01 21:58:35 +0000
committerMoonchild <moonchild@palemoon.org>2020-06-01 21:58:35 +0000
commitc6ca4380e9e5e95df9de02daf8bfb9a6ebc22810 (patch)
treec7672903a2030d37f861b12900165a015f49d10a /gfx/layers
parent451509e2c0188a4164d4b3d1d9f5839ed1e95246 (diff)
parent744b044935f7d1d67fbe0df42d898efcbdd00536 (diff)
downloadUXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar
UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.gz
UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.lz
UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.tar.xz
UXP-c6ca4380e9e5e95df9de02daf8bfb9a6ebc22810.zip
Merge remote-tracking branch 'origin/redwood' into release
Diffstat (limited to 'gfx/layers')
-rw-r--r--gfx/layers/GLImages.cpp1
-rw-r--r--gfx/layers/IMFYCbCrImage.cpp10
-rw-r--r--gfx/layers/TextureDIB.cpp2
-rw-r--r--gfx/layers/apz/src/APZCTreeManager.cpp15
-rw-r--r--gfx/layers/apz/src/AsyncPanZoomController.cpp11
-rw-r--r--gfx/layers/apz/src/GestureEventListener.cpp1
-rw-r--r--gfx/layers/apz/src/InputBlockState.h1
-rw-r--r--gfx/layers/apz/util/ContentProcessController.h1
-rw-r--r--gfx/layers/client/ClientCanvasLayer.cpp3
-rw-r--r--gfx/layers/d3d9/CompositorD3D9.cpp39
-rw-r--r--gfx/layers/d3d9/DeviceManagerD3D9.cpp24
-rw-r--r--gfx/layers/d3d9/DeviceManagerD3D9.h9
-rw-r--r--gfx/layers/d3d9/Nv3DVUtils.cpp148
-rw-r--r--gfx/layers/d3d9/Nv3DVUtils.h86
-rw-r--r--gfx/layers/ipc/CompositorBridgeParent.cpp1
-rw-r--r--gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp3
-rw-r--r--gfx/layers/ipc/CrossProcessCompositorBridgeParent.h1
-rw-r--r--gfx/layers/ipc/VideoBridgeParent.cpp1
-rw-r--r--gfx/layers/ipc/VideoBridgeParent.h1
-rw-r--r--gfx/layers/moz.build39
20 files changed, 61 insertions, 336 deletions
diff --git a/gfx/layers/GLImages.cpp b/gfx/layers/GLImages.cpp
index e45c3e7d6..c151d991b 100644
--- a/gfx/layers/GLImages.cpp
+++ b/gfx/layers/GLImages.cpp
@@ -7,6 +7,7 @@
#include "GLBlitHelper.h"
#include "GLReadTexImageHelper.h"
#include "GLLibraryEGL.h"
+#include "mozilla/gfx/Logging.h"
using namespace mozilla;
using namespace mozilla::gl;
diff --git a/gfx/layers/IMFYCbCrImage.cpp b/gfx/layers/IMFYCbCrImage.cpp
index d5943b030..6740fdbe0 100644
--- a/gfx/layers/IMFYCbCrImage.cpp
+++ b/gfx/layers/IMFYCbCrImage.cpp
@@ -13,6 +13,8 @@
#include "mozilla/layers/TextureClient.h"
#include "d3d9.h"
+using namespace mozilla::gfx;
+
namespace mozilla {
namespace layers {
@@ -67,10 +69,10 @@ struct AutoLockTexture
static already_AddRefed<IDirect3DTexture9>
InitTextures(IDirect3DDevice9* aDevice,
const IntSize &aSize,
- _D3DFORMAT aFormat,
- RefPtr<IDirect3DSurface9>& aSurface,
- HANDLE& aHandle,
- D3DLOCKED_RECT& aLockedRect)
+ _D3DFORMAT aFormat,
+ RefPtr<IDirect3DSurface9>& aSurface,
+ HANDLE& aHandle,
+ D3DLOCKED_RECT& aLockedRect)
{
if (!aDevice) {
return nullptr;
diff --git a/gfx/layers/TextureDIB.cpp b/gfx/layers/TextureDIB.cpp
index 79a9469bf..775538cf3 100644
--- a/gfx/layers/TextureDIB.cpp
+++ b/gfx/layers/TextureDIB.cpp
@@ -7,8 +7,10 @@
#include "gfx2DGlue.h"
#include "mozilla/gfx/DataSurfaceHelpers.h" // For BufferSizeFromDimensions
#include "mozilla/layers/ISurfaceAllocator.h"
+#include "mozilla/layers/TextureForwarder.h"
#include "mozilla/ipc/ProtocolUtils.h"
+
namespace mozilla {
using namespace gfx;
diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp
index f54326360..00eb3f183 100644
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -85,6 +85,21 @@ 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/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp
index 3d4112395..d9ad3ae78 100644
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -33,6 +33,7 @@
#include "mozilla/ClearOnShutdown.h" // for ClearOnShutdown
#include "mozilla/ComputedTimingFunction.h" // for ComputedTimingFunction
#include "mozilla/EventForwards.h" // for nsEventStatus_*
+#include "mozilla/EventStateManager.h"
#include "mozilla/MouseEvents.h" // for WidgetWheelEvent
#include "mozilla/Preferences.h" // for Preferences
#include "mozilla/ReentrantMonitor.h" // for ReentrantMonitorAutoEnter, etc
@@ -44,6 +45,7 @@
#include "mozilla/dom/Touch.h" // for Touch
#include "mozilla/gfx/BasePoint.h" // for BasePoint
#include "mozilla/gfx/BaseRect.h" // for BaseRect
+#include "mozilla/gfx/Coord.h"
#include "mozilla/gfx/Point.h" // for Point, RoundedToInt, etc
#include "mozilla/gfx/Rect.h" // for RoundedIn
#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor
@@ -102,7 +104,12 @@ typedef GeckoContentController::APZStateChange APZStateChange;
typedef GeckoContentController::TapType TapType;
typedef mozilla::gfx::Point Point;
typedef mozilla::gfx::Matrix4x4 Matrix4x4;
+using mozilla::gfx::CoordTyped;
+using mozilla::gfx::IntCoordTyped;
+using mozilla::gfx::IntRectTyped;
using mozilla::gfx::PointTyped;
+using mozilla::gfx::RectTyped;
+using mozilla::gfx::ScaleFactors2D;
// Choose between platform-specific implementations.
#ifdef MOZ_WIDGET_ANDROID
@@ -833,7 +840,9 @@ AsyncPanZoomController::ArePointerEventsConsumable(TouchBlockState* aBlock, uint
}
template <typename Units>
-static CoordTyped<Units> GetAxisStart(AsyncDragMetrics::DragDirection aDir, const PointTyped<Units>& aValue) {
+static CoordTyped<Units> GetAxisStart(
+AsyncDragMetrics::DragDirection aDir,
+const PointTyped<Units>& aValue) {
if (aDir == AsyncDragMetrics::HORIZONTAL) {
return aValue.x;
} else {
diff --git a/gfx/layers/apz/src/GestureEventListener.cpp b/gfx/layers/apz/src/GestureEventListener.cpp
index 7fd07f3ff..0bacc8778 100644
--- a/gfx/layers/apz/src/GestureEventListener.cpp
+++ b/gfx/layers/apz/src/GestureEventListener.cpp
@@ -13,6 +13,7 @@
#include "mozilla/SizePrintfMacros.h" // for PRIuSIZE
#include "nsDebug.h" // for NS_WARNING
#include "nsMathUtils.h" // for NS_hypot
+#include "InputBlockState.h" // for TouchBlockState
#define GEL_LOG(...)
// #define GEL_LOG(...) printf_stderr("GEL: " __VA_ARGS__)
diff --git a/gfx/layers/apz/src/InputBlockState.h b/gfx/layers/apz/src/InputBlockState.h
index 86fb0d03f..528609947 100644
--- a/gfx/layers/apz/src/InputBlockState.h
+++ b/gfx/layers/apz/src/InputBlockState.h
@@ -16,6 +16,7 @@
#include "mozilla/TimeStamp.h" // for TimeStamp
#include "nsTArray.h" // for nsTArray
#include "TouchCounter.h"
+#include "OverscrollHandoffState.h"
namespace mozilla {
namespace layers {
diff --git a/gfx/layers/apz/util/ContentProcessController.h b/gfx/layers/apz/util/ContentProcessController.h
index 07d113c9e..bb1a86d3f 100644
--- a/gfx/layers/apz/util/ContentProcessController.h
+++ b/gfx/layers/apz/util/ContentProcessController.h
@@ -8,6 +8,7 @@
#define mozilla_layers_ContentProcessController_h
#include "mozilla/layers/GeckoContentController.h"
+#include "mozilla/dom/ipc/IdType.h"
class nsIObserver;
diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp
index 32acf1eb2..7e9885ef1 100644
--- a/gfx/layers/client/ClientCanvasLayer.cpp
+++ b/gfx/layers/client/ClientCanvasLayer.cpp
@@ -19,6 +19,9 @@
#include "nsRect.h" // for mozilla::gfx::IntRect
#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc
#include "gfxPrefs.h" // for WebGLForceLayersReadback
+#include "gfxUtils.h"
+#include "TextureClientSharedSurface.h"
+
using namespace mozilla::gfx;
using namespace mozilla::gl;
diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp
index 85c19139f..6f01e7d15 100644
--- a/gfx/layers/d3d9/CompositorD3D9.cpp
+++ b/gfx/layers/d3d9/CompositorD3D9.cpp
@@ -11,7 +11,6 @@
#include "mozilla/layers/ContentHost.h"
#include "mozilla/layers/Effects.h"
#include "nsWindowsHelpers.h"
-#include "Nv3DVUtils.h"
#include "gfxFailure.h"
#include "mozilla/layers/LayerManagerComposite.h"
#include "gfxPrefs.h"
@@ -426,44 +425,6 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
MOZ_ASSERT(sourceCb->GetD3D9Texture());
MOZ_ASSERT(sourceCr->GetD3D9Texture());
- /*
- * Send 3d control data and metadata
- */
- if (mDeviceManager->GetNv3DVUtils()) {
- Nv_Stereo_Mode mode;
- switch (source->AsSourceD3D9()->GetStereoMode()) {
- case StereoMode::LEFT_RIGHT:
- mode = NV_STEREO_MODE_LEFT_RIGHT;
- break;
- case StereoMode::RIGHT_LEFT:
- mode = NV_STEREO_MODE_RIGHT_LEFT;
- break;
- case StereoMode::BOTTOM_TOP:
- mode = NV_STEREO_MODE_BOTTOM_TOP;
- break;
- case StereoMode::TOP_BOTTOM:
- mode = NV_STEREO_MODE_TOP_BOTTOM;
- break;
- case StereoMode::MONO:
- mode = NV_STEREO_MODE_MONO;
- break;
- }
-
- // Send control data even in mono case so driver knows to leave stereo mode.
- mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE);
-
- if (source->AsSourceD3D9()->GetStereoMode() != StereoMode::MONO) {
- mDeviceManager->GetNv3DVUtils()->SendNv3DVControl(mode, true, FIREFOX_3DV_APP_HANDLE);
-
- RefPtr<IDirect3DSurface9> renderTarget;
- d3d9Device->GetRenderTarget(0, getter_AddRefs(renderTarget));
- mDeviceManager->GetNv3DVUtils()->SendNv3DVMetaData((unsigned int)aRect.width,
- (unsigned int)aRect.height,
- (HANDLE)(sourceY->GetD3D9Texture()),
- (HANDLE)(renderTarget));
- }
- }
-
// Linear scaling is default here, adhering to mFilter is difficult since
// presumably even with point filtering we'll still want chroma upsampling
// to be linear. In the current approach we can't.
diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.cpp b/gfx/layers/d3d9/DeviceManagerD3D9.cpp
index 09778bc9c..5aa0e9825 100644
--- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp
+++ b/gfx/layers/d3d9/DeviceManagerD3D9.cpp
@@ -8,7 +8,6 @@
#include "nsIServiceManager.h"
#include "nsIConsoleService.h"
#include "nsPrintfCString.h"
-#include "Nv3DVUtils.h"
#include "plstr.h"
#include <algorithm>
#include "gfx2DGlue.h"
@@ -263,21 +262,6 @@ DeviceManagerD3D9::Initialize()
return false;
}
- if (gfxPrefs::StereoVideoEnabled()) {
- /* Create an Nv3DVUtils instance */
- if (!mNv3DVUtils) {
- mNv3DVUtils = new Nv3DVUtils();
- if (!mNv3DVUtils) {
- NS_WARNING("Could not create a new instance of Nv3DVUtils.");
- }
- }
-
- /* Initialize the Nv3DVUtils object */
- if (mNv3DVUtils) {
- mNv3DVUtils->Initialize();
- }
- }
-
HMODULE d3d9 = LoadLibraryW(L"d3d9.dll");
decltype(Direct3DCreate9)* d3d9Create = (decltype(Direct3DCreate9)*)
GetProcAddress(d3d9, "Direct3DCreate9");
@@ -385,14 +369,6 @@ DeviceManagerD3D9::Initialize()
/*
* Do some post device creation setup
*/
- if (mNv3DVUtils) {
- IUnknown* devUnknown = nullptr;
- if (mDevice) {
- mDevice->QueryInterface(IID_IUnknown, (void **)&devUnknown);
- }
- mNv3DVUtils->SetDeviceInfo(devUnknown);
- }
-
auto failCreateShaderMsg = "[D3D9] failed to create a critical resource (shader) code";
hr = mDevice->CreateVertexShader((DWORD*)LayerQuadVS,
diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.h b/gfx/layers/d3d9/DeviceManagerD3D9.h
index d27b679ab..394f84d9c 100644
--- a/gfx/layers/d3d9/DeviceManagerD3D9.h
+++ b/gfx/layers/d3d9/DeviceManagerD3D9.h
@@ -18,7 +18,6 @@ namespace mozilla {
namespace layers {
class DeviceManagerD3D9;
-class Nv3DVUtils;
class Layer;
class TextureSourceD3D9;
@@ -179,11 +178,6 @@ public:
// returns the register to be used for the mask texture, if appropriate
uint32_t SetShaderMode(ShaderMode aMode, MaskType aMaskType);
- /**
- * Return pointer to the Nv3DVUtils instance
- */
- Nv3DVUtils *GetNv3DVUtils() { return mNv3DVUtils; }
-
/**
* Returns true if this device was removed.
*/
@@ -338,9 +332,6 @@ private:
/* If this device was removed */
bool mDeviceWasRemoved;
- /* Nv3DVUtils instance */
- nsAutoPtr<Nv3DVUtils> mNv3DVUtils;
-
/**
* Verifies all required device capabilities are present.
*/
diff --git a/gfx/layers/d3d9/Nv3DVUtils.cpp b/gfx/layers/d3d9/Nv3DVUtils.cpp
deleted file mode 100644
index 72638228f..000000000
--- a/gfx/layers/d3d9/Nv3DVUtils.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/DebugOnly.h"
-
-#include "nsIServiceManager.h"
-#include "nsIConsoleService.h"
-#include <initguid.h>
-#include "Nv3DVUtils.h"
-
-DEFINE_GUID(CLSID_NV3DVStreaming,
-0xf7747266, 0x777d, 0x4f61, 0xa1, 0x75, 0xdd, 0x5a, 0xdf, 0x1e, 0x37, 0xdf);
-
-DEFINE_GUID(IID_INV3DVStreaming,
-0xf98f9bb2, 0xb914, 0x4d44, 0x98, 0xfa, 0x6e, 0x37, 0x85, 0x16, 0x98, 0x55);
-
-namespace mozilla {
-namespace layers {
-
-/**
- * Constructor and Destructor
- */
-Nv3DVUtils::Nv3DVUtils()
- : m3DVStreaming (nullptr)
-{
-}
-
-Nv3DVUtils::~Nv3DVUtils()
-{
- UnInitialize();
-}
-
-
-// Silence spurious warnings!
-#if defined(WARNING) || defined WARN_IF_FALSE
-#error We shouldn't be redefining these!
-#endif
-// Uncomment these to enable spurious warnings.
-//#define WARNING(str) NS_WARNING(str)
-//#define WARN_IF_FALSE(b, str) NS_WARNING_ASSERTION(b, str)
-#define WARNING(str)
-#define WARN_IF_FALSE(b, str)
-
-/**
- * Initializes the Nv3DVUtils object.
- */
-void
-Nv3DVUtils::Initialize()
-{
- /*
- * Detect if 3D Streaming object is already loaded. Do nothing in that case.
- */
- if (m3DVStreaming) {
- WARNING("Nv3DVStreaming COM object already instantiated.\n");
- return;
- }
-
- /*
- * Create the COM object. If we fail at any stage, just return
- */
- HRESULT hr = CoCreateInstance(CLSID_NV3DVStreaming, nullptr, CLSCTX_INPROC_SERVER, IID_INV3DVStreaming, (void**)(getter_AddRefs(m3DVStreaming)));
- if (FAILED(hr) || !m3DVStreaming) {
- WARNING("Nv3DVStreaming CoCreateInstance failed (disabled).");
- return;
- }
-
- /*
- * Initialize the object. Note that m3DVStreaming cannot be nullptr at this point.
- */
- bool bRetVal = m3DVStreaming->Nv3DVInitialize();
-
- if (!bRetVal) {
- WARNING("Nv3DVStreaming Nv3DVInitialize failed!");
- return;
- }
-}
-
-/**
- * Release resources used by the COM Object, and then release
- * the COM Object (nsRefPtr gets released by setting to nullptr)
- *
- */
-void
-Nv3DVUtils::UnInitialize()
-{
- if (m3DVStreaming) {
- m3DVStreaming->Nv3DVRelease();
- }
-}
-
-/**
- * Sets the device info, along with any other initialization that is needed after device creation
- * Pass the D3D9 device pointer is an IUnknown input argument.
- */
-void
-Nv3DVUtils::SetDeviceInfo(IUnknown *devUnknown)
-{
- if (!devUnknown) {
- WARNING("D3D Device Pointer (IUnknown) is nullptr.\n");
- return;
- }
-
- if (!m3DVStreaming) {
- return;
- }
-
- bool rv = m3DVStreaming->Nv3DVSetDevice(devUnknown);
- if (!rv) {
- WARNING("Nv3DVStreaming Nv3DVControl failed!");
- return;
- }
-
- rv = m3DVStreaming->Nv3DVControl(NV_STEREO_MODE_RIGHT_LEFT, true, FIREFOX_3DV_APP_HANDLE);
- WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!");
-}
-
-/*
- * Send Stereo Control Information. Used mainly to re-route
- * calls from ImageLayerD3D9 to the 3DV COM object
- */
-void
-Nv3DVUtils::SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle)
-{
- if (!m3DVStreaming)
- return;
-
- DebugOnly<bool> rv = m3DVStreaming->Nv3DVControl(eStereoMode, bEnableStereo, dw3DVAppHandle);
- WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVControl failed!");
-}
-
-/*
- * Send Stereo Metadata. Used mainly to re-route calls
- * from ImageLayerD3D9 to the 3DV COM object
- */
-void
-Nv3DVUtils::SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst)
-{
- if (!m3DVStreaming)
- return;
-
- DebugOnly<bool> rv = m3DVStreaming->Nv3DVMetaData((DWORD)dwWidth, (DWORD)dwHeight, hSrcLuma, hDst);
- WARN_IF_FALSE(rv, "Nv3DVStreaming Nv3DVMetaData failed!");
-}
-
-} /* namespace layers */
-} /* namespace mozilla */
diff --git a/gfx/layers/d3d9/Nv3DVUtils.h b/gfx/layers/d3d9/Nv3DVUtils.h
deleted file mode 100644
index 0712dd888..000000000
--- a/gfx/layers/d3d9/Nv3DVUtils.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef GFX_NV3DVUTILS_H
-#define GFX_NV3DVUTILS_H
-
-#include "Layers.h"
-#include <windows.h>
-#include <d3d9.h>
-
-namespace mozilla {
-namespace layers {
-
-#define FIREFOX_3DV_APP_HANDLE 0xECB992B6
-
-enum Nv_Stereo_Mode {
- NV_STEREO_MODE_LEFT_RIGHT = 0,
- NV_STEREO_MODE_RIGHT_LEFT = 1,
- NV_STEREO_MODE_TOP_BOTTOM = 2,
- NV_STEREO_MODE_BOTTOM_TOP = 3,
- NV_STEREO_MODE_MONO = 4,
- NV_STEREO_MODE_LAST = 5
-};
-
-class INv3DVStreaming : public IUnknown {
-
-public:
- virtual bool Nv3DVInitialize() = 0;
- virtual bool Nv3DVRelease() = 0;
- virtual bool Nv3DVSetDevice(IUnknown* pDevice) = 0;
- virtual bool Nv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle) = 0;
- virtual bool Nv3DVMetaData(DWORD dwWidth, DWORD dwHeight, HANDLE hSrcLuma, HANDLE hDst) = 0;
-};
-
-/*
- * Nv3DVUtils class
- */
-class Nv3DVUtils {
-
-public:
- Nv3DVUtils();
- ~Nv3DVUtils();
-
- /*
- * Initializes the Nv3DVUtils object.
- */
- void Initialize();
-
- /*
- * Release any resources if needed
- *
- */
- void UnInitialize();
-
- /*
- * Sets the device info, along with any other initialization that is needed after device creation
- * Pass the D3D9 device pointer is an IUnknown input argument
- */
- void SetDeviceInfo(IUnknown *devUnknown);
-
- /*
- * Send Stereo Control Information. Used mainly to re-route
- * calls from ImageLayerD3D9 to the 3DV COM object
- */
- void SendNv3DVControl(Nv_Stereo_Mode eStereoMode, bool bEnableStereo, DWORD dw3DVAppHandle);
-
- /*
- * Send Stereo Metadata. Used mainly to re-route calls
- * from ImageLayerD3D9 to the 3DV COM object
- */
- void SendNv3DVMetaData(unsigned int dwWidth, unsigned int dwHeight, HANDLE hSrcLuma, HANDLE hDst);
-
-private:
-
- /* Nv3DVStreaming interface pointer */
- RefPtr<INv3DVStreaming> m3DVStreaming;
-
-};
-
-
-} // namespace layers
-} // namespace mozilla
-
-#endif /* GFX_NV3DVUTILS_H */
diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp
index 97ea984db..9a2df849b 100644
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -28,6 +28,7 @@
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/gfx/2D.h" // for DrawTarget
+#include "mozilla/gfx/gfxVars.h"
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for IntSize
#include "mozilla/ipc/Transport.h" // for Transport
diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
index 8bb5cf2d5..9509cf16a 100644
--- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp
@@ -84,9 +84,10 @@
#include "LayerScope.h"
namespace mozilla {
-
namespace layers {
+using namespace std;
+
// defined in CompositorBridgeParent.cpp
typedef map<uint64_t, CompositorBridgeParent::LayerTreeState> LayerTreeMap;
extern LayerTreeMap sIndirectLayerTrees;
diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h
index 399969950..ca213bbd5 100644
--- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h
+++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h
@@ -8,6 +8,7 @@
#define mozilla_layers_CrossProcessCompositorBridgeParent_h
#include "mozilla/layers/CompositorBridgeParent.h"
+#include "mozilla/layers/CompositorThread.h"
namespace mozilla {
namespace layers {
diff --git a/gfx/layers/ipc/VideoBridgeParent.cpp b/gfx/layers/ipc/VideoBridgeParent.cpp
index fce2184c8..f8e3c5314 100644
--- a/gfx/layers/ipc/VideoBridgeParent.cpp
+++ b/gfx/layers/ipc/VideoBridgeParent.cpp
@@ -12,7 +12,6 @@ namespace layers {
using namespace mozilla::ipc;
using namespace mozilla::gfx;
-using namespace mozilla::media;
static VideoBridgeParent* sVideoBridgeSingleton;
diff --git a/gfx/layers/ipc/VideoBridgeParent.h b/gfx/layers/ipc/VideoBridgeParent.h
index e5560acab..bde18b632 100644
--- a/gfx/layers/ipc/VideoBridgeParent.h
+++ b/gfx/layers/ipc/VideoBridgeParent.h
@@ -7,6 +7,7 @@
#define gfx_layers_ipc_VideoBridgeParent_h_
#include "mozilla/layers/PVideoBridgeParent.h"
+#include "mozilla/layers/ISurfaceAllocator.h"
namespace mozilla {
namespace layers {
diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build
index 2a2fa1169..2242a774b 100644
--- a/gfx/layers/moz.build
+++ b/gfx/layers/moz.build
@@ -49,8 +49,6 @@ EXPORTS += [
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
SOURCES += [
'D3D11ShareHandleImage.cpp',
- ]
- UNIFIED_SOURCES += [
'D3D9SurfaceImage.cpp',
'IMFYCbCrImage.cpp',
'TextureDIB.cpp',
@@ -66,13 +64,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'd3d9/CompositorD3D9.h',
'd3d9/TextureD3D9.h',
]
- UNIFIED_SOURCES += [
- 'd3d9/TextureD3D9.cpp',
- ]
SOURCES += [
'd3d9/CompositorD3D9.cpp',
'd3d9/DeviceManagerD3D9.cpp',
- 'd3d9/Nv3DVUtils.cpp',
+ 'd3d9/TextureD3D9.cpp',
]
if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
EXPORTS.mozilla.layers += [
@@ -80,12 +75,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'd3d11/ReadbackManagerD3D11.h',
'd3d11/TextureD3D11.h',
]
- UNIFIED_SOURCES += [
- 'd3d11/TextureD3D11.cpp',
- ]
SOURCES += [
'd3d11/CompositorD3D11.cpp',
'd3d11/ReadbackManagerD3D11.cpp',
+ 'd3d11/TextureD3D11.cpp',
]
EXPORTS.gfxipc += [
@@ -229,21 +222,19 @@ 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',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
- UNIFIED_SOURCES += [
+ SOURCES += [
'apz/src/AndroidAPZ.cpp',
]
-UNIFIED_SOURCES += [
+SOURCES += [
'apz/public/IAPZCTreeManager.cpp',
'apz/src/APZCTreeManager.cpp',
'apz/src/AsyncPanZoomController.cpp',
@@ -278,6 +269,7 @@ UNIFIED_SOURCES += [
'basic/BasicColorLayer.cpp',
'basic/BasicCompositor.cpp',
'basic/BasicContainerLayer.cpp',
+ 'basic/BasicImageLayer.cpp',
'basic/BasicImages.cpp',
'basic/BasicLayerManager.cpp',
'basic/BasicLayersImpl.cpp',
@@ -326,6 +318,7 @@ UNIFIED_SOURCES += [
'Effects.cpp',
'FrameMetrics.cpp',
'GLImages.cpp',
+ 'ImageContainer.cpp',
'ImageDataSerializer.cpp',
'ImageLayers.cpp',
'ipc/APZChild.cpp',
@@ -335,9 +328,7 @@ UNIFIED_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',
@@ -355,10 +346,12 @@ UNIFIED_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',
@@ -366,6 +359,7 @@ UNIFIED_SOURCES += [
'opengl/TextureClientOGL.cpp',
'opengl/TextureHostOGL.cpp',
'opengl/TexturePoolOGL.cpp',
+ 'PersistentBufferProvider.cpp',
'protobuf/LayerScopePacket.pb.cc',
'ReadbackProcessor.cpp',
'RenderTrace.cpp',
@@ -373,12 +367,11 @@ UNIFIED_SOURCES += [
'TextureWrapperImage.cpp',
]
-SOURCES += [
- 'basic/BasicImageLayer.cpp',
- 'ImageContainer.cpp',
- 'Layers.cpp',
- 'LayerTreeInvalidation.cpp',
- 'PersistentBufferProvider.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',
]
# Disable RTTI in google protocol buffer
@@ -446,6 +439,6 @@ if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
if CONFIG['MOZ_ENABLE_SKIA']:
- UNIFIED_SOURCES += [
+ SOURCES += [
'composite/PaintCounter.cpp',
]