Bug 1050609 - Fix more bad implicit constructors in gfx/layers; r=roc

This commit is contained in:
Ehsan Akhgari 2014-08-20 00:55:14 -04:00
Родитель 5ba894ef8c
Коммит 015ce11986
62 изменённых файлов: 113 добавлений и 113 удалений

Просмотреть файл

@ -197,7 +197,7 @@ protected:
public:
NS_INLINE_DECL_REFCOUNTING(Compositor)
Compositor(PCompositorParent* aParent = nullptr)
explicit Compositor(PCompositorParent* aParent = nullptr)
: mCompositorID(0)
, mDiagnosticTypes(DiagnosticTypes::NO_DIAGNOSTIC)
, mParent(aParent)

Просмотреть файл

@ -42,7 +42,7 @@ struct Effect
{
NS_INLINE_DECL_REFCOUNTING(Effect)
Effect(EffectTypes aType) : mType(aType) {}
explicit Effect(EffectTypes aType) : mType(aType) {}
EffectTypes mType;
@ -98,7 +98,7 @@ struct EffectMask : public Effect
struct EffectBlendMode : public Effect
{
EffectBlendMode(gfx::CompositionOp aBlendMode)
explicit EffectBlendMode(gfx::CompositionOp aBlendMode)
: Effect(EffectTypes::BLEND_MODE)
, mBlendMode(aBlendMode)
{ }
@ -112,7 +112,7 @@ struct EffectBlendMode : public Effect
// Render to a render target rather than the screen.
struct EffectRenderTarget : public TexturedEffect
{
EffectRenderTarget(CompositingRenderTarget *aRenderTarget)
explicit EffectRenderTarget(CompositingRenderTarget *aRenderTarget)
: TexturedEffect(EffectTypes::RENDER_TARGET, aRenderTarget, true, gfx::Filter::LINEAR)
, mRenderTarget(aRenderTarget)
{}
@ -183,7 +183,7 @@ struct EffectComponentAlpha : public TexturedEffect
struct EffectSolidColor : public Effect
{
EffectSolidColor(const gfx::Color &aColor)
explicit EffectSolidColor(const gfx::Color &aColor)
: Effect(EffectTypes::SOLID_COLOR)
, mColor(aColor)
{}

Просмотреть файл

@ -57,7 +57,7 @@ public:
*/
class SurfaceReleaser : public nsRunnable {
public:
SurfaceReleaser(RawRef aRef) : mRef(aRef) {}
explicit SurfaceReleaser(RawRef aRef) : mRef(aRef) {}
NS_IMETHOD Run() {
mRef->Release();
return NS_OK;
@ -350,7 +350,7 @@ public:
enum { DISABLE_ASYNC = 0x0, ENABLE_ASYNC = 0x01 };
ImageContainer(int flag = 0);
explicit ImageContainer(int flag = 0);
/**
* Create an Image in one of the given formats.
@ -666,7 +666,7 @@ private:
class AutoLockImage
{
public:
AutoLockImage(ImageContainer *aContainer) : mContainer(aContainer) { mImage = mContainer->LockCurrentImage(); }
explicit AutoLockImage(ImageContainer *aContainer) : mContainer(aContainer) { mImage = mContainer->LockCurrentImage(); }
AutoLockImage(ImageContainer *aContainer, RefPtr<gfx::SourceSurface> *aSurface) : mContainer(aContainer) {
*aSurface = mContainer->LockCurrentAsSourceSurface(&mSize, getter_AddRefs(mImage));
}
@ -821,7 +821,7 @@ public:
virtual gfx::IntSize GetSize() { return mSize; }
PlanarYCbCrImage(BufferRecycleBin *aRecycleBin);
explicit PlanarYCbCrImage(BufferRecycleBin *aRecycleBin);
virtual SharedPlanarYCbCrImage *AsSharedPlanarYCbCrImage() { return nullptr; }

Просмотреть файл

@ -366,7 +366,7 @@ StaticAutoPtr<LayerScopeWebSocketManager> WebSocketHelper::sWebSocketManager;
*/
class DebugGLData: public LinkedListElement<DebugGLData> {
public:
DebugGLData(Packet::DataType aDataType)
explicit DebugGLData(Packet::DataType aDataType)
: mDataType(aDataType)
{ }
@ -399,7 +399,7 @@ public:
mFrameStamp(aValue)
{ }
DebugGLFrameStatusData(Packet::DataType aDataType)
explicit DebugGLFrameStatusData(Packet::DataType aDataType)
: DebugGLData(aDataType),
mFrameStamp(0)
{ }
@ -547,7 +547,7 @@ protected:
class DebugGLLayersData : public DebugGLData {
public:
DebugGLLayersData(UniquePtr<Packet> aPacket)
explicit DebugGLLayersData(UniquePtr<Packet> aPacket)
: DebugGLData(Packet::LAYERS),
mPacket(Move(aPacket))
{ }

Просмотреть файл

@ -41,7 +41,7 @@ public:
// Perform BeginFrame and EndFrame automatically
class LayerScopeAutoFrame {
public:
LayerScopeAutoFrame(int64_t aFrameStamp);
explicit LayerScopeAutoFrame(int64_t aFrameStamp);
~LayerScopeAutoFrame();
private:

Просмотреть файл

@ -98,7 +98,7 @@ NotifySubdocumentInvalidationRecursive(Layer* aLayer, NotifySubDocInvalidationFu
struct LayerPropertiesBase : public LayerProperties
{
LayerPropertiesBase(Layer* aLayer)
explicit LayerPropertiesBase(Layer* aLayer)
: mLayer(aLayer)
, mMaskLayer(nullptr)
, mVisibleRegion(aLayer->GetVisibleRegion())
@ -212,7 +212,7 @@ struct LayerPropertiesBase : public LayerProperties
struct ContainerLayerProperties : public LayerPropertiesBase
{
ContainerLayerProperties(ContainerLayer* aLayer)
explicit ContainerLayerProperties(ContainerLayer* aLayer)
: LayerPropertiesBase(aLayer)
, mPreXScale(aLayer->GetPreXScale())
, mPreYScale(aLayer->GetPreYScale())
@ -322,7 +322,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
struct ColorLayerProperties : public LayerPropertiesBase
{
ColorLayerProperties(ColorLayer *aLayer)
explicit ColorLayerProperties(ColorLayer *aLayer)
: LayerPropertiesBase(aLayer)
, mColor(aLayer->GetColor())
{ }
@ -345,7 +345,7 @@ struct ColorLayerProperties : public LayerPropertiesBase
struct ImageLayerProperties : public LayerPropertiesBase
{
ImageLayerProperties(ImageLayer* aImage)
explicit ImageLayerProperties(ImageLayer* aImage)
: LayerPropertiesBase(aImage)
, mContainer(aImage->GetContainer())
, mFilter(aImage->GetFilter())

Просмотреть файл

@ -190,7 +190,7 @@ public:
ContainsVisibleBounds
};
RotatedContentBuffer(BufferSizePolicy aBufferSizePolicy)
explicit RotatedContentBuffer(BufferSizePolicy aBufferSizePolicy)
: mBufferProvider(nullptr)
, mBufferProviderOnWhite(nullptr)
, mBufferSizePolicy(aBufferSizePolicy)

Просмотреть файл

@ -646,7 +646,7 @@ private:
class OverscrollSnapBackAnimation: public AsyncPanZoomAnimation {
public:
OverscrollSnapBackAnimation(AsyncPanZoomController& aApzc)
explicit OverscrollSnapBackAnimation(AsyncPanZoomController& aApzc)
: mApzc(aApzc)
{
// Make sure the initial velocity is zero. This is normally the case

Просмотреть файл

@ -1074,8 +1074,8 @@ class AsyncPanZoomAnimation {
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AsyncPanZoomAnimation)
public:
AsyncPanZoomAnimation(const TimeDuration& aRepaintInterval =
TimeDuration::Forever())
explicit AsyncPanZoomAnimation(const TimeDuration& aRepaintInterval =
TimeDuration::Forever())
: mRepaintInterval(aRepaintInterval)
{ }

Просмотреть файл

@ -35,7 +35,7 @@ class AsyncPanZoomController;
*/
class Axis {
public:
Axis(AsyncPanZoomController* aAsyncPanZoomController);
explicit Axis(AsyncPanZoomController* aAsyncPanZoomController);
enum Overscroll {
// Overscroll is not happening at all.
@ -246,7 +246,7 @@ protected:
class AxisX : public Axis {
public:
AxisX(AsyncPanZoomController* mAsyncPanZoomController);
explicit AxisX(AsyncPanZoomController* mAsyncPanZoomController);
virtual CSSCoord GetPointOffset(const CSSPoint& aPoint) const;
virtual CSSCoord GetRectLength(const CSSRect& aRect) const;
virtual CSSCoord GetRectOffset(const CSSRect& aRect) const;
@ -254,7 +254,7 @@ public:
class AxisY : public Axis {
public:
AxisY(AsyncPanZoomController* mAsyncPanZoomController);
explicit AxisY(AsyncPanZoomController* mAsyncPanZoomController);
virtual CSSCoord GetPointOffset(const CSSPoint& aPoint) const;
virtual CSSCoord GetRectLength(const CSSRect& aRect) const;
virtual CSSCoord GetRectOffset(const CSSRect& aRect) const;

Просмотреть файл

@ -40,7 +40,7 @@ class GestureEventListener MOZ_FINAL {
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GestureEventListener)
GestureEventListener(AsyncPanZoomController* aAsyncPanZoomController);
explicit GestureEventListener(AsyncPanZoomController* aAsyncPanZoomController);
// --------------------------------------------------------------------------
// These methods must only be called on the controller/UI thread.

Просмотреть файл

@ -22,7 +22,7 @@ class BasicCanvasLayer : public CopyableCanvasLayer,
public BasicImplData
{
public:
BasicCanvasLayer(BasicLayerManager* aLayerManager) :
explicit BasicCanvasLayer(BasicLayerManager* aLayerManager) :
CopyableCanvasLayer(aLayerManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{ }

Просмотреть файл

@ -26,7 +26,7 @@ namespace layers {
class BasicColorLayer : public ColorLayer, public BasicImplData {
public:
BasicColorLayer(BasicLayerManager* aLayerManager) :
explicit BasicColorLayer(BasicLayerManager* aLayerManager) :
ColorLayer(aLayerManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{

Просмотреть файл

@ -40,7 +40,7 @@ public:
class BasicCompositor : public Compositor
{
public:
BasicCompositor(nsIWidget *aWidget);
explicit BasicCompositor(nsIWidget *aWidget);
protected:
virtual ~BasicCompositor();

Просмотреть файл

@ -19,7 +19,7 @@ namespace layers {
class BasicContainerLayer : public ContainerLayer, public BasicImplData {
public:
BasicContainerLayer(BasicLayerManager* aManager) :
explicit BasicContainerLayer(BasicLayerManager* aManager) :
ContainerLayer(aManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{

Просмотреть файл

@ -25,7 +25,7 @@ namespace layers {
class BasicImageLayer : public ImageLayer, public BasicImplData {
public:
BasicImageLayer(BasicLayerManager* aLayerManager) :
explicit BasicImageLayer(BasicLayerManager* aLayerManager) :
ImageLayer(aLayerManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST())),
mSize(-1, -1)

Просмотреть файл

@ -56,7 +56,7 @@ public:
* must be called for any rendering to happen. ThebesLayers will not
* be retained.
*/
BasicLayerManager(BasicLayerManagerType aType);
explicit BasicLayerManager(BasicLayerManagerType aType);
/**
* Construct a BasicLayerManager which will have no default
* target context. SetDefaultTarget or BeginTransactionWithTarget
@ -72,7 +72,7 @@ public:
* must ensure that the widget outlives the layer manager or call
* ClearWidget before the widget dies.
*/
BasicLayerManager(nsIWidget* aWidget);
explicit BasicLayerManager(nsIWidget* aWidget);
protected:
virtual ~BasicLayerManager();

Просмотреть файл

@ -49,7 +49,7 @@ class BasicReadbackLayer : public ReadbackLayer,
public BasicImplData
{
public:
BasicReadbackLayer(BasicLayerManager* aLayerManager) :
explicit BasicReadbackLayer(BasicLayerManager* aLayerManager) :
ReadbackLayer(aLayerManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{

Просмотреть файл

@ -30,7 +30,7 @@ public:
typedef RotatedContentBuffer::PaintState PaintState;
typedef RotatedContentBuffer::ContentType ContentType;
BasicThebesLayer(BasicLayerManager* aLayerManager) :
explicit BasicThebesLayer(BasicLayerManager* aLayerManager) :
ThebesLayer(aLayerManager,
static_cast<BasicImplData*>(MOZ_THIS_IN_INITIALIZER_LIST())),
mContentClient(nullptr)

Просмотреть файл

@ -36,7 +36,7 @@ class ClientCanvasLayer : public CopyableCanvasLayer,
{
typedef CanvasClient::CanvasClientType CanvasClientType;
public:
ClientCanvasLayer(ClientLayerManager* aLayerManager) :
explicit ClientCanvasLayer(ClientLayerManager* aLayerManager) :
CopyableCanvasLayer(aLayerManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()))
, mTextureSurface(nullptr)

Просмотреть файл

@ -21,7 +21,7 @@ using namespace mozilla::gfx;
class ClientColorLayer : public ColorLayer,
public ClientLayer {
public:
ClientColorLayer(ClientLayerManager* aLayerManager) :
explicit ClientColorLayer(ClientLayerManager* aLayerManager) :
ColorLayer(aLayerManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{

Просмотреть файл

@ -27,7 +27,7 @@ class ClientContainerLayer : public ContainerLayer,
public ClientLayer
{
public:
ClientContainerLayer(ClientLayerManager* aManager) :
explicit ClientContainerLayer(ClientLayerManager* aManager) :
ContainerLayer(aManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{
@ -150,7 +150,7 @@ protected:
class ClientRefLayer : public RefLayer,
public ClientLayer {
public:
ClientRefLayer(ClientLayerManager* aManager) :
explicit ClientRefLayer(ClientLayerManager* aManager) :
RefLayer(aManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()))
{

Просмотреть файл

@ -26,7 +26,7 @@ using namespace mozilla::gfx;
class ClientImageLayer : public ImageLayer,
public ClientLayer {
public:
ClientImageLayer(ClientLayerManager* aLayerManager)
explicit ClientImageLayer(ClientLayerManager* aLayerManager)
: ImageLayer(aLayerManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()))
, mImageClientTypeContainer(CompositableType::BUFFER_UNKNOWN)

Просмотреть файл

@ -43,7 +43,7 @@ class ClientLayerManager : public LayerManager
typedef nsTArray<nsRefPtr<Layer> > LayerRefArray;
public:
ClientLayerManager(nsIWidget* aWidget);
explicit ClientLayerManager(nsIWidget* aWidget);
protected:
virtual ~ClientLayerManager();

Просмотреть файл

@ -17,7 +17,7 @@ class ClientReadbackLayer :
public ClientLayer
{
public:
ClientReadbackLayer(ClientLayerManager *aManager)
explicit ClientReadbackLayer(ClientLayerManager *aManager)
: ReadbackLayer(aManager, nullptr)
{
mImplData = static_cast<ClientLayer*>(this);

Просмотреть файл

@ -33,8 +33,8 @@ public:
typedef RotatedContentBuffer::PaintState PaintState;
typedef RotatedContentBuffer::ContentType ContentType;
ClientThebesLayer(ClientLayerManager* aLayerManager,
LayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE) :
explicit ClientThebesLayer(ClientLayerManager* aLayerManager,
LayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE) :
ThebesLayer(aLayerManager,
static_cast<ClientLayer*>(MOZ_THIS_IN_INITIALIZER_LIST()),
aCreationHint),

Просмотреть файл

@ -41,8 +41,8 @@ class ClientTiledThebesLayer : public ThebesLayer,
typedef ThebesLayer Base;
public:
ClientTiledThebesLayer(ClientLayerManager* const aManager,
ClientLayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE);
explicit ClientTiledThebesLayer(ClientLayerManager* const aManager,
ClientLayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE);
protected:
~ClientTiledThebesLayer();

Просмотреть файл

@ -123,7 +123,7 @@ protected:
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CompositableClient)
CompositableClient(CompositableForwarder* aForwarder, TextureFlags aFlags = TextureFlags::NO_FLAGS);
explicit CompositableClient(CompositableForwarder* aForwarder, TextureFlags aFlags = TextureFlags::NO_FLAGS);
virtual TextureInfo GetTextureInfo() const = 0;
@ -246,8 +246,8 @@ protected:
*/
struct AutoRemoveTexture
{
AutoRemoveTexture(CompositableClient* aCompositable,
TextureClient* aTexture = nullptr)
explicit AutoRemoveTexture(CompositableClient* aCompositable,
TextureClient* aTexture = nullptr)
: mTexture(aTexture)
, mCompositable(aCompositable)
{}

Просмотреть файл

@ -83,7 +83,7 @@ public:
*/
static TemporaryRef<ContentClient> CreateContentClient(CompositableForwarder* aFwd);
ContentClient(CompositableForwarder* aForwarder)
explicit ContentClient(CompositableForwarder* aForwarder)
: CompositableClient(aForwarder)
{}
virtual ~ContentClient()
@ -113,7 +113,7 @@ public:
class ContentClientRemote : public ContentClient
{
public:
ContentClientRemote(CompositableForwarder* aForwarder)
explicit ContentClientRemote(CompositableForwarder* aForwarder)
: ContentClient(aForwarder)
{}
@ -190,7 +190,7 @@ class ContentClientRemoteBuffer : public ContentClientRemote
using RotatedContentBuffer::BufferRect;
using RotatedContentBuffer::BufferRotation;
public:
ContentClientRemoteBuffer(CompositableForwarder* aForwarder)
explicit ContentClientRemoteBuffer(CompositableForwarder* aForwarder)
: ContentClientRemote(aForwarder)
, RotatedContentBuffer(ContainsVisibleBounds)
, mIsNewBuffer(false)
@ -315,7 +315,7 @@ protected:
class ContentClientDoubleBuffered : public ContentClientRemoteBuffer
{
public:
ContentClientDoubleBuffered(CompositableForwarder* aFwd)
explicit ContentClientDoubleBuffered(CompositableForwarder* aFwd)
: ContentClientRemoteBuffer(aFwd)
{
mTextureInfo.mCompositableType = CompositableType::CONTENT_DOUBLE;
@ -374,7 +374,7 @@ private:
class ContentClientSingleBuffered : public ContentClientRemoteBuffer
{
public:
ContentClientSingleBuffered(CompositableForwarder* aFwd)
explicit ContentClientSingleBuffered(CompositableForwarder* aFwd)
: ContentClientRemoteBuffer(aFwd)
{
mTextureInfo.mCompositableType = CompositableType::CONTENT_SINGLE;
@ -394,7 +394,7 @@ class ContentClientIncremental : public ContentClientRemote
, public BorrowDrawTarget
{
public:
ContentClientIncremental(CompositableForwarder* aFwd)
explicit ContentClientIncremental(CompositableForwarder* aFwd)
: ContentClientRemote(aFwd)
, mContentType(gfxContentType::COLOR_ALPHA)
, mHasBuffer(false)

Просмотреть файл

@ -163,8 +163,8 @@ class SimpleClientTiledThebesLayer : public ThebesLayer,
typedef ThebesLayer Base;
public:
SimpleClientTiledThebesLayer(ClientLayerManager* const aManager,
ClientLayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE);
explicit SimpleClientTiledThebesLayer(ClientLayerManager* const aManager,
ClientLayerManager::ThebesLayerCreationHint aCreationHint = LayerManager::NONE);
protected:
~SimpleClientTiledThebesLayer();

Просмотреть файл

@ -137,7 +137,7 @@ class TextureClient
: public AtomicRefCountedWithFinalize<TextureClient>
{
public:
TextureClient(TextureFlags aFlags = TextureFlags::DEFAULT);
explicit TextureClient(TextureFlags aFlags = TextureFlags::DEFAULT);
virtual ~TextureClient();
// Creates and allocates a TextureClient usable with Moz2D.
@ -465,7 +465,7 @@ protected:
class TextureClientReleaseTask : public Task
{
public:
TextureClientReleaseTask(TextureClient* aClient)
explicit TextureClientReleaseTask(TextureClient* aClient)
: mTextureClient(aClient) {
}
@ -620,7 +620,7 @@ protected:
class StreamTextureClient : public TextureClient
{
public:
StreamTextureClient(TextureFlags aFlags);
explicit StreamTextureClient(TextureFlags aFlags);
protected:
~StreamTextureClient();
@ -669,7 +669,7 @@ struct TextureClientAutoUnlock
{
TextureClient* mTexture;
TextureClientAutoUnlock(TextureClient* aTexture)
explicit TextureClientAutoUnlock(TextureClient* aTexture)
: mTexture(aTexture) {}
~TextureClientAutoUnlock()
@ -688,7 +688,7 @@ template<typename T>
class TKeepAlive : public KeepAlive
{
public:
TKeepAlive(T* aData) : mData(aData) {}
explicit TKeepAlive(T* aData) : mData(aData) {}
protected:
RefPtr<T> mData;
};

Просмотреть файл

@ -97,7 +97,7 @@ private:
};
public:
gfxShmSharedReadLock(ISurfaceAllocator* aAllocator);
explicit gfxShmSharedReadLock(ISurfaceAllocator* aAllocator);
protected:
~gfxShmSharedReadLock();

Просмотреть файл

@ -28,8 +28,8 @@ class AutoResolveRefLayers;
// Represents (affine) transforms that are calculated from a content view.
struct ViewTransform {
ViewTransform(ParentLayerToScreenScale aScale = ParentLayerToScreenScale(),
ScreenPoint aTranslation = ScreenPoint())
explicit ViewTransform(ParentLayerToScreenScale aScale = ParentLayerToScreenScale(),
ScreenPoint aTranslation = ScreenPoint())
: mScale(aScale)
, mTranslation(aTranslation)
{}
@ -76,7 +76,7 @@ class AsyncCompositionManager MOZ_FINAL
public:
NS_INLINE_DECL_REFCOUNTING(AsyncCompositionManager)
AsyncCompositionManager(LayerManagerComposite* aManager)
explicit AsyncCompositionManager(LayerManagerComposite* aManager)
: mLayerManager(aManager)
, mIsFirstPaint(false)
, mLayersUpdated(false)
@ -207,7 +207,7 @@ private:
class MOZ_STACK_CLASS AutoResolveRefLayers {
public:
AutoResolveRefLayers(AsyncCompositionManager* aManager) : mManager(aManager)
explicit AutoResolveRefLayers(AsyncCompositionManager* aManager) : mManager(aManager)
{
if (mManager) {
mManager->ResolveRefLayers();

Просмотреть файл

@ -28,7 +28,7 @@ class CanvasLayerComposite : public CanvasLayer,
public LayerComposite
{
public:
CanvasLayerComposite(LayerManagerComposite* aManager);
explicit CanvasLayerComposite(LayerManagerComposite* aManager);
protected:
virtual ~CanvasLayerComposite();

Просмотреть файл

@ -23,7 +23,7 @@ class ColorLayerComposite : public ColorLayer,
public LayerComposite
{
public:
ColorLayerComposite(LayerManagerComposite *aManager)
explicit ColorLayerComposite(LayerManagerComposite *aManager)
: ColorLayer(aManager, nullptr)
, LayerComposite(aManager)
{

Просмотреть файл

@ -88,7 +88,7 @@ protected:
public:
NS_INLINE_DECL_REFCOUNTING(CompositableHost)
CompositableHost(const TextureInfo& aTextureInfo);
explicit CompositableHost(const TextureInfo& aTextureInfo);
static TemporaryRef<CompositableHost> Create(const TextureInfo& aTextureInfo);
@ -304,7 +304,7 @@ protected:
class AutoLockCompositableHost MOZ_FINAL
{
public:
AutoLockCompositableHost(CompositableHost* aHost)
explicit AutoLockCompositableHost(CompositableHost* aHost)
: mHost(aHost)
{
mSucceeded = mHost->Lock();

Просмотреть файл

@ -53,7 +53,7 @@ class ContainerLayerComposite : public ContainerLayer,
const nsIntRect& aClipRect);
public:
ContainerLayerComposite(LayerManagerComposite *aManager);
explicit ContainerLayerComposite(LayerManagerComposite *aManager);
protected:
~ContainerLayerComposite();
@ -117,7 +117,7 @@ class RefLayerComposite : public RefLayer,
const nsIntRect& aClipRect);
public:
RefLayerComposite(LayerManagerComposite *aManager);
explicit RefLayerComposite(LayerManagerComposite *aManager);
protected:
~RefLayerComposite();

Просмотреть файл

@ -68,7 +68,7 @@ public:
bool PaintWillResample() { return mPaintWillResample; }
protected:
ContentHost(const TextureInfo& aTextureInfo)
explicit ContentHost(const TextureInfo& aTextureInfo)
: CompositableHost(aTextureInfo)
, mPaintWillResample(false)
{}
@ -93,7 +93,7 @@ public:
typedef RotatedContentBuffer::ContentType ContentType;
typedef RotatedContentBuffer::PaintState PaintState;
ContentHostBase(const TextureInfo& aTextureInfo);
explicit ContentHostBase(const TextureInfo& aTextureInfo);
virtual ~ContentHostBase();
virtual void Composite(EffectChain& aEffectChain,
@ -127,7 +127,7 @@ protected:
class ContentHostTexture : public ContentHostBase
{
public:
ContentHostTexture(const TextureInfo& aTextureInfo)
explicit ContentHostTexture(const TextureInfo& aTextureInfo)
: ContentHostBase(aTextureInfo)
, mLocked(false)
{ }
@ -201,7 +201,7 @@ protected:
class ContentHostDoubleBuffered : public ContentHostTexture
{
public:
ContentHostDoubleBuffered(const TextureInfo& aTextureInfo)
explicit ContentHostDoubleBuffered(const TextureInfo& aTextureInfo)
: ContentHostTexture(aTextureInfo)
{}
@ -225,7 +225,7 @@ protected:
class ContentHostSingleBuffered : public ContentHostTexture
{
public:
ContentHostSingleBuffered(const TextureInfo& aTextureInfo)
explicit ContentHostSingleBuffered(const TextureInfo& aTextureInfo)
: ContentHostTexture(aTextureInfo)
{}
virtual ~ContentHostSingleBuffered() {}
@ -251,7 +251,7 @@ public:
class ContentHostIncremental : public ContentHostBase
{
public:
ContentHostIncremental(const TextureInfo& aTextureInfo);
explicit ContentHostIncremental(const TextureInfo& aTextureInfo);
~ContentHostIncremental();
virtual CompositableType GetType() { return CompositableType::BUFFER_CONTENT_INC; }

Просмотреть файл

@ -58,7 +58,7 @@ const int kMaxFrames = 2400;
*/
class FPSCounter {
public:
FPSCounter(const char* aName);
explicit FPSCounter(const char* aName);
~FPSCounter();
void AddFrame(TimeStamp aTimestamp);

Просмотреть файл

@ -40,7 +40,7 @@ struct EffectChain;
class ImageHost : public CompositableHost
{
public:
ImageHost(const TextureInfo& aTextureInfo);
explicit ImageHost(const TextureInfo& aTextureInfo);
~ImageHost();
virtual CompositableType GetType() { return mTextureInfo.mCompositableType; }

Просмотреть файл

@ -31,7 +31,7 @@ class ImageLayerComposite : public ImageLayer,
typedef gl::TextureImage TextureImage;
public:
ImageLayerComposite(LayerManagerComposite* aManager);
explicit ImageLayerComposite(LayerManagerComposite* aManager);
protected:
virtual ~ImageLayerComposite();

Просмотреть файл

@ -73,7 +73,7 @@ class LayerManagerComposite : public LayerManager
typedef mozilla::gfx::SurfaceFormat SurfaceFormat;
public:
LayerManagerComposite(Compositor* aCompositor);
explicit LayerManagerComposite(Compositor* aCompositor);
~LayerManagerComposite();
virtual void Destroy() MOZ_OVERRIDE;
@ -315,7 +315,7 @@ private:
class LayerComposite
{
public:
LayerComposite(LayerManagerComposite* aManager);
explicit LayerComposite(LayerManagerComposite* aManager);
virtual ~LayerComposite();

Просмотреть файл

@ -22,7 +22,7 @@ class TextRenderer
public:
NS_INLINE_DECL_REFCOUNTING(TextRenderer)
TextRenderer(Compositor *aCompositor)
explicit TextRenderer(Compositor *aCompositor)
: mCompositor(aCompositor)
{
}

Просмотреть файл

@ -71,7 +71,7 @@ namespace layers {
class TextureParent : public PTextureParent
{
public:
TextureParent(CompositableParentManager* aManager);
explicit TextureParent(CompositableParentManager* aManager);
~TextureParent();

Просмотреть файл

@ -286,7 +286,7 @@ class TextureHost
friend class AtomicRefCountedWithFinalize<TextureHost>;
public:
TextureHost(TextureFlags aFlags);
explicit TextureHost(TextureFlags aFlags);
protected:
virtual ~TextureHost();
@ -652,7 +652,7 @@ protected:
class MOZ_STACK_CLASS AutoLockTextureHost
{
public:
AutoLockTextureHost(TextureHost* aTexture)
explicit AutoLockTextureHost(TextureHost* aTexture)
: mTexture(aTexture)
{
mLocked = mTexture ? mTexture->Lock() : false;
@ -679,7 +679,7 @@ private:
class CompositingRenderTarget : public TextureSource
{
public:
CompositingRenderTarget(const gfx::IntPoint& aOrigin)
explicit CompositingRenderTarget(const gfx::IntPoint& aOrigin)
: mOrigin(aOrigin)
{}
virtual ~CompositingRenderTarget() {}

Просмотреть файл

@ -37,7 +37,7 @@ class ThebesLayerComposite : public ThebesLayer,
public LayerComposite
{
public:
ThebesLayerComposite(LayerManagerComposite *aManager);
explicit ThebesLayerComposite(LayerManagerComposite *aManager);
protected:
virtual ~ThebesLayerComposite();

Просмотреть файл

@ -189,7 +189,7 @@ class TiledContentHost : public ContentHost,
public TiledLayerComposer
{
public:
TiledContentHost(const TextureInfo& aTextureInfo);
explicit TiledContentHost(const TextureInfo& aTextureInfo);
protected:
~TiledContentHost();

Просмотреть файл

@ -190,7 +190,7 @@ protected:
*/
class FenceDeliveryTracker : public AsyncTransactionTracker {
public:
FenceDeliveryTracker(FenceHandle& aFenceHandle)
explicit FenceDeliveryTracker(FenceHandle& aFenceHandle)
: mFenceHandle(aFenceHandle)
{
MOZ_COUNT_CTOR(FenceDeliveryTracker);

Просмотреть файл

@ -41,7 +41,7 @@ class CompositorChild MOZ_FINAL : public PCompositorChild
NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(CompositorChild)
public:
CompositorChild(ClientLayerManager *aLayerManager);
explicit CompositorChild(ClientLayerManager *aLayerManager);
void Destroy();

Просмотреть файл

@ -93,9 +93,9 @@ class CompositorParent : public PCompositorParent,
NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(CompositorParent)
public:
CompositorParent(nsIWidget* aWidget,
bool aUseExternalSurfaceSize = false,
int aSurfaceWidth = -1, int aSurfaceHeight = -1);
explicit CompositorParent(nsIWidget* aWidget,
bool aUseExternalSurfaceSize = false,
int aSurfaceWidth = -1, int aSurfaceHeight = -1);
// IToplevelProtocol::CloneToplevel()
virtual IToplevelProtocol*

Просмотреть файл

@ -23,14 +23,14 @@ struct FenceHandleFromChild;
struct FenceHandle {
FenceHandle() {}
FenceHandle(const FenceHandleFromChild& aFenceHandle) {}
explicit FenceHandle(const FenceHandleFromChild& aFenceHandle) {}
bool operator==(const FenceHandle&) const { return false; }
bool IsValid() const { return false; }
};
struct FenceHandleFromChild {
FenceHandleFromChild() {}
FenceHandleFromChild(const FenceHandle& aFence) {}
explicit FenceHandleFromChild(const FenceHandle& aFence) {}
bool operator==(const FenceHandle&) const { return false; }
bool operator==(const FenceHandleFromChild&) const { return false; }
bool IsValid() const { return false; }

Просмотреть файл

@ -101,7 +101,7 @@ struct CompositableTransaction
};
struct AutoEndTransaction {
AutoEndTransaction(CompositableTransaction* aTxn) : mTxn(aTxn) {}
explicit AutoEndTransaction(CompositableTransaction* aTxn) : mTxn(aTxn) {}
~AutoEndTransaction() { mTxn->End(); }
CompositableTransaction* mTxn;
};
@ -464,7 +464,7 @@ ImageBridgeChild::BeginTransaction()
class MOZ_STACK_CLASS AutoRemoveTextures
{
public:
AutoRemoveTextures(ImageBridgeChild* aImageBridge)
explicit AutoRemoveTextures(ImageBridgeChild* aImageBridge)
: mImageBridge(aImageBridge) {}
~AutoRemoveTextures()

Просмотреть файл

@ -20,7 +20,7 @@ class ShadowableLayer;
class ShadowLayerChild : public PLayerChild
{
public:
ShadowLayerChild(ShadowableLayer* aLayer);
explicit ShadowLayerChild(ShadowableLayer* aLayer);
virtual ~ShadowLayerChild();
ShadowableLayer* layer() const { return mLayer; }

Просмотреть файл

@ -154,7 +154,7 @@ private:
Transaction& operator=(const Transaction&);
};
struct AutoTxnEnd {
AutoTxnEnd(Transaction* aTxn) : mTxn(aTxn) {}
explicit AutoTxnEnd(Transaction* aTxn) : mTxn(aTxn) {}
~AutoTxnEnd() { mTxn->End(); }
Transaction* mTxn;
};

Просмотреть файл

@ -108,7 +108,7 @@ void InitGralloc() {
class DeleteSharedBufferManagerParentTask : public Task
{
public:
DeleteSharedBufferManagerParentTask(UniquePtr<SharedBufferManagerParent> aSharedBufferManager)
explicit DeleteSharedBufferManagerParentTask(UniquePtr<SharedBufferManagerParent> aSharedBufferManager)
: mSharedBufferManager(Move(aSharedBufferManager)) {
}
virtual void Run() MOZ_OVERRIDE {}

Просмотреть файл

@ -28,7 +28,7 @@ class SharedPlanarYCbCrImage : public PlanarYCbCrImage
, public ISharedImage
{
public:
SharedPlanarYCbCrImage(ImageClient* aCompositable);
explicit SharedPlanarYCbCrImage(ImageClient* aCompositable);
protected:
~SharedPlanarYCbCrImage();

Просмотреть файл

@ -40,7 +40,7 @@ class SharedRGBImage : public Image
, public ISharedImage
{
public:
SharedRGBImage(ImageClient* aCompositable);
explicit SharedRGBImage(ImageClient* aCompositable);
protected:
~SharedRGBImage();

Просмотреть файл

@ -85,7 +85,7 @@ public:
class PerUnitTexturePoolOGL : public CompositorTexturePoolOGL
{
public:
PerUnitTexturePoolOGL(gl::GLContext* aGL)
explicit PerUnitTexturePoolOGL(gl::GLContext* aGL)
: mTextureTarget(0) // zero is never a valid texture target
, mGL(aGL)
{}
@ -124,7 +124,7 @@ protected:
class PerFrameTexturePoolOGL : public CompositorTexturePoolOGL
{
public:
PerFrameTexturePoolOGL(gl::GLContext* aGL)
explicit PerFrameTexturePoolOGL(gl::GLContext* aGL)
: mTextureTarget(0) // zero is never a valid texture target
, mGL(aGL)
{}
@ -162,8 +162,8 @@ class CompositorOGL MOZ_FINAL : public Compositor
std::map<ShaderConfigOGL, ShaderProgramOGL*> mPrograms;
public:
CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth = -1, int aSurfaceHeight = -1,
bool aUseExternalSurfaceSize = false);
explicit CompositorOGL(nsIWidget *aWidget, int aSurfaceWidth = -1, int aSurfaceHeight = -1,
bool aUseExternalSurfaceSize = false);
protected:
virtual ~CompositorOGL();

Просмотреть файл

@ -23,7 +23,7 @@ namespace layers {
class GLManagerCompositor : public GLManager
{
public:
GLManagerCompositor(CompositorOGL* aCompositor)
explicit GLManagerCompositor(CompositorOGL* aCompositor)
: mImpl(aCompositor)
{}

Просмотреть файл

@ -16,7 +16,7 @@ namespace layers {
class MacIOSurfaceTextureClientOGL : public TextureClient
{
public:
MacIOSurfaceTextureClientOGL(TextureFlags aFlags);
explicit MacIOSurfaceTextureClientOGL(TextureFlags aFlags);
virtual ~MacIOSurfaceTextureClientOGL();

Просмотреть файл

@ -32,7 +32,7 @@ class CompositableForwarder;
class SharedTextureClientOGL : public TextureClient
{
public:
SharedTextureClientOGL(TextureFlags aFlags);
explicit SharedTextureClientOGL(TextureFlags aFlags);
~SharedTextureClientOGL();

Просмотреть файл

@ -212,8 +212,8 @@ class TextureImageTextureSourceOGL : public DataTextureSource
, public BigImageIterator
{
public:
TextureImageTextureSourceOGL(gl::GLContext* aGL,
TextureFlags aFlags = TextureFlags::DEFAULT)
explicit TextureImageTextureSourceOGL(gl::GLContext* aGL,
TextureFlags aFlags = TextureFlags::DEFAULT)
: mGL(aGL)
, mFlags(aFlags)
, mIterating(false)