Loading gfx/layers/Effects.h +7 −16 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ struct TexturedEffect : public Effect TextureSource* mTexture; bool mPremultiplied; gfx::SamplingFilter mSamplingFilter; LayerRenderState mState; }; // Support an alpha mask. Loading Loading @@ -233,8 +232,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(gfx::SurfaceFormat aFormat, TextureSource* aSource, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aSource); RefPtr<TexturedEffect> result; Loading @@ -257,8 +255,6 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat, break; } result->mState = state; return result.forget(); } Loading @@ -266,8 +262,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureHost* aHost, TextureSource* aSource, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aHost); MOZ_ASSERT(aSource); Loading @@ -280,8 +275,7 @@ CreateTexturedEffect(TextureHost* aHost, result = CreateTexturedEffect(aHost->GetReadFormat(), aSource, aSamplingFilter, isAlphaPremultiplied, state); isAlphaPremultiplied); } return result.forget(); } Loading @@ -296,8 +290,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureSource* aSource, TextureSource* aSourceOnWhite, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aSource); if (aSourceOnWhite) { Loading @@ -311,8 +304,7 @@ CreateTexturedEffect(TextureSource* aSource, return CreateTexturedEffect(aSource->GetFormat(), aSource, aSamplingFilter, isAlphaPremultiplied, state); isAlphaPremultiplied); } /** Loading @@ -322,10 +314,9 @@ CreateTexturedEffect(TextureSource* aSource, */ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureSource *aTexture, const gfx::SamplingFilter aSamplingFilter, const LayerRenderState &state = LayerRenderState()) const gfx::SamplingFilter aSamplingFilter) { return CreateTexturedEffect(aTexture, nullptr, aSamplingFilter, true, state); return CreateTexturedEffect(aTexture, nullptr, aSamplingFilter, true); } Loading gfx/layers/LayerScope.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ #include "LayerScope.h" #include "nsAppRunner.h" #include "Composer2D.h" #include "Effects.h" #include "mozilla/EndianUtils.h" #include "mozilla/MathAlgorithms.h" Loading gfx/layers/Layers.h +0 −2 Original line number Diff line number Diff line Loading @@ -1792,8 +1792,6 @@ public: uint32_t GetDebugColorIndex() { return mDebugColorIndex; } #endif virtual LayerRenderState GetRenderState() { return LayerRenderState(); } void Mutated() { mManager->Mutated(this); } Loading gfx/layers/LayersTypes.cppdeleted 100644 → 0 +0 −29 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * 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 "LayersTypes.h" namespace mozilla { namespace layers { LayerRenderState::LayerRenderState() : mFlags(LayerRenderStateFlags::LAYER_RENDER_STATE_DEFAULT) , mHasOwnOffset(false) { } LayerRenderState::LayerRenderState(const LayerRenderState& aOther) : mFlags(aOther.mFlags) , mHasOwnOffset(aOther.mHasOwnOffset) , mOffset(aOther.mOffset) { } LayerRenderState::~LayerRenderState() { } } // namespace layers } // namespace mozilla gfx/layers/LayersTypes.h +0 −37 Original line number Diff line number Diff line Loading @@ -70,43 +70,6 @@ enum class SurfaceMode : int8_t { SURFACE_COMPONENT_ALPHA }; // LayerRenderState for Composer2D enum class LayerRenderStateFlags : int8_t { LAYER_RENDER_STATE_DEFAULT = 0, ORIGIN_BOTTOM_LEFT = 1 << 0, BUFFER_ROTATION = 1 << 1, // Notify Composer2D to swap the RB pixels of gralloc buffer FORMAT_RB_SWAP = 1 << 2, // We record opaqueness here alongside the actual surface we're going to // render. This avoids confusion when a layer might return different kinds // of surfaces over time (e.g. video frames). OPAQUE = 1 << 3 }; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(LayerRenderStateFlags) struct LayerRenderState { // Constructors and destructor are defined in LayersTypes.cpp so we don't // have to pull in a definition for GraphicBuffer.h here. In KK at least, // that results in nasty pollution such as libui's hardware.h #defining // 'version_major' and 'version_minor' which conflict with Theora's codec.c... LayerRenderState(); LayerRenderState(const LayerRenderState& aOther); ~LayerRenderState(); void SetOffset(const nsIntPoint& aOffset) { mOffset = aOffset; mHasOwnOffset = true; } // see LayerRenderStateFlags LayerRenderStateFlags mFlags; // true if mOffset is applicable bool mHasOwnOffset; // the location of the layer's origin on mSurface nsIntPoint mOffset; }; enum class ScaleMode : int8_t { SCALE_NONE, STRETCH, Loading Loading
gfx/layers/Effects.h +7 −16 Original line number Diff line number Diff line Loading @@ -77,7 +77,6 @@ struct TexturedEffect : public Effect TextureSource* mTexture; bool mPremultiplied; gfx::SamplingFilter mSamplingFilter; LayerRenderState mState; }; // Support an alpha mask. Loading Loading @@ -233,8 +232,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(gfx::SurfaceFormat aFormat, TextureSource* aSource, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aSource); RefPtr<TexturedEffect> result; Loading @@ -257,8 +255,6 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat, break; } result->mState = state; return result.forget(); } Loading @@ -266,8 +262,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureHost* aHost, TextureSource* aSource, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aHost); MOZ_ASSERT(aSource); Loading @@ -280,8 +275,7 @@ CreateTexturedEffect(TextureHost* aHost, result = CreateTexturedEffect(aHost->GetReadFormat(), aSource, aSamplingFilter, isAlphaPremultiplied, state); isAlphaPremultiplied); } return result.forget(); } Loading @@ -296,8 +290,7 @@ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureSource* aSource, TextureSource* aSourceOnWhite, const gfx::SamplingFilter aSamplingFilter, bool isAlphaPremultiplied, const LayerRenderState &state = LayerRenderState()) bool isAlphaPremultiplied) { MOZ_ASSERT(aSource); if (aSourceOnWhite) { Loading @@ -311,8 +304,7 @@ CreateTexturedEffect(TextureSource* aSource, return CreateTexturedEffect(aSource->GetFormat(), aSource, aSamplingFilter, isAlphaPremultiplied, state); isAlphaPremultiplied); } /** Loading @@ -322,10 +314,9 @@ CreateTexturedEffect(TextureSource* aSource, */ inline already_AddRefed<TexturedEffect> CreateTexturedEffect(TextureSource *aTexture, const gfx::SamplingFilter aSamplingFilter, const LayerRenderState &state = LayerRenderState()) const gfx::SamplingFilter aSamplingFilter) { return CreateTexturedEffect(aTexture, nullptr, aSamplingFilter, true, state); return CreateTexturedEffect(aTexture, nullptr, aSamplingFilter, true); } Loading
gfx/layers/LayerScope.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ #include "LayerScope.h" #include "nsAppRunner.h" #include "Composer2D.h" #include "Effects.h" #include "mozilla/EndianUtils.h" #include "mozilla/MathAlgorithms.h" Loading
gfx/layers/Layers.h +0 −2 Original line number Diff line number Diff line Loading @@ -1792,8 +1792,6 @@ public: uint32_t GetDebugColorIndex() { return mDebugColorIndex; } #endif virtual LayerRenderState GetRenderState() { return LayerRenderState(); } void Mutated() { mManager->Mutated(this); } Loading
gfx/layers/LayersTypes.cppdeleted 100644 → 0 +0 −29 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * 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 "LayersTypes.h" namespace mozilla { namespace layers { LayerRenderState::LayerRenderState() : mFlags(LayerRenderStateFlags::LAYER_RENDER_STATE_DEFAULT) , mHasOwnOffset(false) { } LayerRenderState::LayerRenderState(const LayerRenderState& aOther) : mFlags(aOther.mFlags) , mHasOwnOffset(aOther.mHasOwnOffset) , mOffset(aOther.mOffset) { } LayerRenderState::~LayerRenderState() { } } // namespace layers } // namespace mozilla
gfx/layers/LayersTypes.h +0 −37 Original line number Diff line number Diff line Loading @@ -70,43 +70,6 @@ enum class SurfaceMode : int8_t { SURFACE_COMPONENT_ALPHA }; // LayerRenderState for Composer2D enum class LayerRenderStateFlags : int8_t { LAYER_RENDER_STATE_DEFAULT = 0, ORIGIN_BOTTOM_LEFT = 1 << 0, BUFFER_ROTATION = 1 << 1, // Notify Composer2D to swap the RB pixels of gralloc buffer FORMAT_RB_SWAP = 1 << 2, // We record opaqueness here alongside the actual surface we're going to // render. This avoids confusion when a layer might return different kinds // of surfaces over time (e.g. video frames). OPAQUE = 1 << 3 }; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(LayerRenderStateFlags) struct LayerRenderState { // Constructors and destructor are defined in LayersTypes.cpp so we don't // have to pull in a definition for GraphicBuffer.h here. In KK at least, // that results in nasty pollution such as libui's hardware.h #defining // 'version_major' and 'version_minor' which conflict with Theora's codec.c... LayerRenderState(); LayerRenderState(const LayerRenderState& aOther); ~LayerRenderState(); void SetOffset(const nsIntPoint& aOffset) { mOffset = aOffset; mHasOwnOffset = true; } // see LayerRenderStateFlags LayerRenderStateFlags mFlags; // true if mOffset is applicable bool mHasOwnOffset; // the location of the layer's origin on mSurface nsIntPoint mOffset; }; enum class ScaleMode : int8_t { SCALE_NONE, STRETCH, Loading