Skip to content

Commit

Permalink
Merge mozilla-central to mozilla-inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Jun 23, 2017
2 parents 7af37a5 + 35cd4f0 commit 88fff78
Show file tree
Hide file tree
Showing 105 changed files with 18 additions and 11,195 deletions.
20 changes: 0 additions & 20 deletions dom/base/nsDOMWindowUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2326,26 +2326,6 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::GetUsingAdvancedLayers(bool* retval)
{
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget) {
return NS_ERROR_FAILURE;
}

LayerManager *mgr = widget->GetLayerManager();
if (!mgr) {
return NS_ERROR_FAILURE;
}

*retval = false;
if (KnowsCompositor* fwd = mgr->AsKnowsCompositor()) {
*retval = fwd->GetTextureFactoryIdentifier().mUsingAdvancedLayers;
}
return NS_OK;
}

NS_IMETHODIMP
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> aPromise)
{
Expand Down
9 changes: 1 addition & 8 deletions dom/canvas/WebGLShaderValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
options |= SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
#endif

if (gl->WorkAroundDriverBugs()) {
#ifdef XP_MACOSX
if (gl->WorkAroundDriverBugs()) {
// Work around https://bugs.webkit.org/show_bug.cgi?id=124684,
// https://chromium.googlesource.com/angle/angle/+/5e70cf9d0b1bb
options |= SH_UNFOLD_SHORT_CIRCUIT;
Expand All @@ -59,13 +59,6 @@ ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
options |= SH_ADD_AND_TRUE_TO_LOOP_CONDITION;
#endif

if (!gl->IsANGLE() && gl->Vendor() == gl::GLVendor::Intel) {
// Failures on at least Windows+Intel+OGL on:
// conformance/glsl/constructors/glsl-construct-mat2.html
options |= SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS;
}
}

if (gfxPrefs::WebGLAllANGLEOptions()) {
options = -1;

Expand Down
5 changes: 0 additions & 5 deletions dom/interfaces/base/nsIDOMWindowUtils.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1416,11 +1416,6 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute boolean layerManagerRemote;

/**
* True if advanced layers is enabled on this window, false otherwise.
*/
readonly attribute boolean usingAdvancedLayers;

/**
* Returns a Promise that will be resolved with a string once the capabilities
* of the h264 decoder have been determined.
Expand Down
1 change: 0 additions & 1 deletion gfx/config/gfxFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace gfx {
_(GPU_PROCESS, Feature, "GPU Process") \
_(WEBRENDER, Feature, "WebRender") \
_(OMTP, Feature, "Off Main Thread Painting") \
_(ADVANCED_LAYERS, Feature, "Advanced Layers") \
/* Add new entries above this comment */

enum class Feature : uint32_t {
Expand Down
313 changes: 0 additions & 313 deletions gfx/doc/AdvancedLayers.md

This file was deleted.

8 changes: 0 additions & 8 deletions gfx/ipc/CompositorOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,18 @@ class CompositorOptions
CompositorOptions()
: mUseAPZ(false)
, mUseWebRender(false)
, mUseAdvancedLayers(false)
{
}

explicit CompositorOptions(bool aUseAPZ,
bool aUseWebRender)
: mUseAPZ(aUseAPZ)
, mUseWebRender(aUseWebRender)
, mUseAdvancedLayers(false)
{
}

bool UseAPZ() const { return mUseAPZ; }
bool UseWebRender() const { return mUseWebRender; }
bool UseAdvancedLayers() const { return mUseAdvancedLayers; }

void SetUseAdvancedLayers(bool aUseAdvancedLayers) {
mUseAdvancedLayers = aUseAdvancedLayers;
}

bool operator==(const CompositorOptions& aOther) const {
return mUseAPZ == aOther.mUseAPZ &&
Expand All @@ -62,7 +55,6 @@ class CompositorOptions
private:
bool mUseAPZ;
bool mUseWebRender;
bool mUseAdvancedLayers;

// Make sure to add new fields to the ParamTraits implementation
};
Expand Down
8 changes: 0 additions & 8 deletions gfx/ipc/GPUChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ GPUChild::Init()
devicePrefs.hwCompositing() = gfxConfig::GetValue(Feature::HW_COMPOSITING);
devicePrefs.d3d11Compositing() = gfxConfig::GetValue(Feature::D3D11_COMPOSITING);
devicePrefs.oglCompositing() = gfxConfig::GetValue(Feature::OPENGL_COMPOSITING);
devicePrefs.advancedLayers() = gfxConfig::GetValue(Feature::ADVANCED_LAYERS);
devicePrefs.useD2D1() = gfxConfig::GetValue(Feature::DIRECT2D);

nsTArray<LayerTreeIdMapping> mappings;
Expand Down Expand Up @@ -273,13 +272,6 @@ GPUChild::ActorDestroy(ActorDestroyReason aWhy)
mHost->OnChannelClosed();
}

mozilla::ipc::IPCResult
GPUChild::RecvUpdateFeature(const Feature& aFeature, const FeatureFailure& aChange)
{
gfxConfig::SetFailed(aFeature, aChange.status(), aChange.message().get(), aChange.failureId());
return IPC_OK();
}

class DeferredDeleteGPUChild : public Runnable
{
public:
Expand Down
1 change: 0 additions & 1 deletion gfx/ipc/GPUChild.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class GPUChild final
mozilla::ipc::IPCResult RecvNotifyDeviceReset(const GPUDeviceData& aData) override;
mozilla::ipc::IPCResult RecvAddMemoryReport(const MemoryReport& aReport) override;
mozilla::ipc::IPCResult RecvFinishMemoryReport(const uint32_t& aGeneration) override;
mozilla::ipc::IPCResult RecvUpdateFeature(const Feature& aFeature, const FeatureFailure& aChange) override;

bool SendRequestMemoryReport(const uint32_t& aGeneration,
const bool& aAnonymize,
Expand Down
4 changes: 0 additions & 4 deletions gfx/ipc/GPUParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "mozilla/layers/ImageBridgeParent.h"
#include "mozilla/layers/LayerTreeOwnerTracker.h"
#include "mozilla/layers/UiCompositorControllerParent.h"
#include "mozilla/layers/MemoryReportingMLGPU.h"
#include "mozilla/webrender/RenderThread.h"
#include "nsDebugImpl.h"
#include "nsExceptionHandler.h"
Expand Down Expand Up @@ -105,7 +104,6 @@ GPUParent::Init(base::ProcessId aParentPid,
gfxPlatform::InitNullMetadata();
// Ensure our Factory is initialised, mainly for gfx logging to work.
gfxPlatform::InitMoz2DLogging();
mlg::InitializeMemoryReporters();
#if defined(XP_WIN)
DeviceManagerDx::Init();
#endif
Expand Down Expand Up @@ -170,7 +168,6 @@ GPUParent::RecvInit(nsTArray<GfxPrefSetting>&& prefs,
gfxConfig::Inherit(Feature::HW_COMPOSITING, devicePrefs.hwCompositing());
gfxConfig::Inherit(Feature::D3D11_COMPOSITING, devicePrefs.d3d11Compositing());
gfxConfig::Inherit(Feature::OPENGL_COMPOSITING, devicePrefs.oglCompositing());
gfxConfig::Inherit(Feature::ADVANCED_LAYERS, devicePrefs.advancedLayers());
gfxConfig::Inherit(Feature::DIRECT2D, devicePrefs.useD2D1());

for (const LayerTreeIdMapping& map : aMappings) {
Expand Down Expand Up @@ -303,7 +300,6 @@ GPUParent::RecvGetDeviceStatus(GPUDeviceData* aOut)
{
CopyFeatureChange(Feature::D3D11_COMPOSITING, &aOut->d3d11Compositing());
CopyFeatureChange(Feature::OPENGL_COMPOSITING, &aOut->oglCompositing());
CopyFeatureChange(Feature::ADVANCED_LAYERS, &aOut->advancedLayers());

#if defined(XP_WIN)
if (DeviceManagerDx* dm = DeviceManagerDx::Get()) {
Expand Down
10 changes: 0 additions & 10 deletions gfx/ipc/GfxMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "RegionBuilder.h"
#include "base/process_util.h"
#include "chrome/common/ipc_message_utils.h"
#include "gfxFeature.h"
#include "gfxPoint.h"
#include "gfxRect.h"
#include "gfxTelemetry.h"
Expand Down Expand Up @@ -220,14 +219,6 @@ struct ParamTraits<mozilla::gfx::BackendType>
mozilla::gfx::BackendType::BACKEND_LAST>
{};

template <>
struct ParamTraits<mozilla::gfx::Feature>
: public ContiguousEnumSerializer<
mozilla::gfx::Feature,
mozilla::gfx::Feature::HW_COMPOSITING,
mozilla::gfx::Feature::NumValues>
{};

template <>
struct ParamTraits<mozilla::gfx::FeatureStatus>
: public ContiguousEnumSerializer<
Expand Down Expand Up @@ -913,7 +904,6 @@ struct ParamTraits<mozilla::Array<T, Length>>
}
};


} /* namespace IPC */

#endif /* __GFXMESSAGEUTILS_H__ */
2 changes: 0 additions & 2 deletions gfx/ipc/GraphicsMessages.ipdlh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct DevicePrefs
FeatureStatus hwCompositing;
FeatureStatus d3d11Compositing;
FeatureStatus oglCompositing;
FeatureStatus advancedLayers;
FeatureStatus useD2D1;
};

Expand Down Expand Up @@ -64,7 +63,6 @@ struct GPUDeviceData
{
FeatureChange d3d11Compositing;
FeatureChange oglCompositing;
FeatureChange advancedLayers;
GPUDeviceStatus gpuDevice;
};

Expand Down
5 changes: 0 additions & 5 deletions gfx/ipc/PGPU.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ using mozilla::Telemetry::ScalarAction from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::KeyedScalarAction from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::ChildEventData from "mozilla/TelemetryComms.h";
using mozilla::Telemetry::DiscardedData from "mozilla/TelemetryComms.h";
using mozilla::gfx::Feature from "gfxFeature.h";

namespace mozilla {
namespace gfx {
Expand Down Expand Up @@ -116,10 +115,6 @@ child:

async AddMemoryReport(MemoryReport aReport);
async FinishMemoryReport(uint32_t aGeneration);

// Update the UI process after a feature's status has changed. This is used
// outside of the normal startup flow.
async UpdateFeature(Feature aFeature, FeatureFailure aChange);
};

} // namespace gfx
Expand Down
2 changes: 0 additions & 2 deletions gfx/layers/CompositorTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ struct TextureFactoryIdentifier
bool mSupportsPartialUploads;
bool mSupportsComponentAlpha;
bool mSupportsBackdropCopyForComponentAlpha;
bool mUsingAdvancedLayers;
SyncHandle mSyncHandle;

explicit TextureFactoryIdentifier(LayersBackend aLayersBackend = LayersBackend::LAYERS_NONE,
Expand All @@ -194,7 +193,6 @@ struct TextureFactoryIdentifier
, mSupportsPartialUploads(aSupportsPartialUploads)
, mSupportsComponentAlpha(aSupportsComponentAlpha)
, mSupportsBackdropCopyForComponentAlpha(true)
, mUsingAdvancedLayers(false)
, mSyncHandle(aSyncHandle)
{}
};
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/LayersHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "mozilla/gfx/Rect.h"
#include "mozilla/gfx/Matrix.h"
#include "mozilla/gfx/Polygon.h"
#include "nsRegion.h"
#include "nsTArray.h"

namespace mozilla {
Expand Down
1 change: 0 additions & 1 deletion gfx/layers/apz/util/ContentProcessController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mozilla/dom/TabChild.h"
#include "mozilla/layers/APZCCallbackHelper.h"
#include "mozilla/layers/APZChild.h"
#include "nsIContentInlines.h"

#include "InputData.h" // for InputData

Expand Down
14 changes: 1 addition & 13 deletions gfx/layers/composite/LayerManagerComposite.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ class TextRenderer;
class CompositingRenderTarget;
struct FPSState;
class PaintCounter;
class LayerMLGPU;
class LayerManagerMLGPU;
class UiCompositorControllerParent;

static const int kVisualWarningDuration = 150; // ms
Expand Down Expand Up @@ -125,9 +123,6 @@ class HostLayerManager : public LayerManager
virtual HostLayerManager* AsHostLayerManager() override {
return this;
}
virtual LayerManagerMLGPU* AsLayerManagerMLGPU() {
return nullptr;
}

void ExtractImageCompositeNotifications(nsTArray<ImageCompositeNotificationInfo>* aNotifications)
{
Expand Down Expand Up @@ -555,8 +550,6 @@ class HostLayer

virtual Layer* GetLayer() = 0;

virtual LayerMLGPU* AsLayerMLGPU() { return nullptr; }

virtual bool SetCompositableHost(CompositableHost*)
{
// We must handle this gracefully, see bug 967824
Expand All @@ -576,10 +569,6 @@ class HostLayer
{
mShadowVisibleRegion = aRegion;
}
void SetShadowVisibleRegion(LayerIntRegion&& aRegion)
{
mShadowVisibleRegion = Move(aRegion);
}

void SetShadowOpacity(float aOpacity)
{
Expand Down Expand Up @@ -607,12 +596,11 @@ class HostLayer
// These getters can be used anytime.
float GetShadowOpacity() { return mShadowOpacity; }
const Maybe<ParentLayerIntRect>& GetShadowClipRect() { return mShadowClipRect; }
const LayerIntRegion& GetShadowVisibleRegion() const { return mShadowVisibleRegion; }
const LayerIntRegion& GetShadowVisibleRegion() { return mShadowVisibleRegion; }
const gfx::Matrix4x4& GetShadowBaseTransform() { return mShadowTransform; }
gfx::Matrix4x4 GetShadowTransform();
bool GetShadowTransformSetByAnimation() { return mShadowTransformSetByAnimation; }
bool GetShadowOpacitySetByAnimation() { return mShadowOpacitySetByAnimation; }
LayerIntRegion&& GetShadowVisibleRegion() { return Move(mShadowVisibleRegion); }

protected:
HostLayerManager* mCompositorManager;
Expand Down
4 changes: 2 additions & 2 deletions gfx/layers/d3d11/CompositorD3D11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ using namespace gfx;

namespace layers {

bool CanUsePartialPresents(ID3D11Device* aDevice);
static bool CanUsePartialPresents(ID3D11Device* aDevice);

const FLOAT sBlendFactor[] = { 0, 0, 0, 0 };

Expand Down Expand Up @@ -255,7 +255,7 @@ CompositorD3D11::Initialize(nsCString* const out_failureReason)
return true;
}

bool
static bool
CanUsePartialPresents(ID3D11Device* aDevice)
{
if (gfxPrefs::PartialPresent() > 0) {
Expand Down
Loading

0 comments on commit 88fff78

Please sign in to comment.