Skip to content

Commit

Permalink
Bug 903819 - Don't include Layers.h everywhere, part 4 r=nrc
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbarsky committed Aug 20, 2013
1 parent bc57cc7 commit bf5c77a
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions content/html/content/src/HTMLAnchorElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "mozilla/Attributes.h"
#include "mozilla/dom/Link.h"
#include "nsContentUtils.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLAnchorElement.h"

Expand Down
1 change: 0 additions & 1 deletion content/media/MediaDecoderReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "mozilla/ReentrantMonitor.h"
#include "MediaStreamGraph.h"
#include "SharedBuffer.h"
#include "ImageLayers.h"
#include "AudioSampleFormat.h"
#include "MediaResource.h"
#include "mozilla/dom/HTMLMediaElement.h"
Expand Down
5 changes: 4 additions & 1 deletion content/media/dash/DASHRepDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@
#define DASHRepDecoder_h_

#include "Representation.h"
#include "ImageLayers.h"
#include "DASHDecoder.h"
#include "WebMDecoder.h"
#include "WebMReader.h"
#include "MediaDecoder.h"

namespace mozilla {

namespace layers {
class ImageContainer;
}

class DASHDecoder;
class DASHRepReader;

Expand Down
1 change: 1 addition & 0 deletions dom/ipc/ContentParent.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class PCompositorParent;

namespace dom {

class Element;
class TabParent;
class PStorageParent;
class ClonedMessageData;
Expand Down
10 changes: 4 additions & 6 deletions gfx/ipc/GfxMessageUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/CompositorTypes.h"
#include "FrameMetrics.h"
#include "ImageLayers.h"

#ifdef _MSC_VER
#pragma warning( disable : 4800 )
Expand All @@ -39,7 +38,6 @@ typedef gfxASurface::gfxContentType gfxContentType;
typedef gfxASurface::gfxImageFormat PixelFormat;
typedef gfxASurface::gfxSurfaceType gfxSurfaceType;
typedef gfxPattern::GraphicsFilter GraphicsFilterType;
typedef layers::ImageLayer::ScaleMode ScaleMode;

} // namespace mozilla

Expand Down Expand Up @@ -216,10 +214,10 @@ struct ParamTraits<mozilla::layers::LayersBackend>
{};

template <>
struct ParamTraits<mozilla::ScaleMode>
: public EnumSerializer<mozilla::ScaleMode,
mozilla::layers::ImageLayer::SCALE_NONE,
mozilla::layers::ImageLayer::SCALE_SENTINEL>
struct ParamTraits<mozilla::layers::ScaleMode>
: public EnumSerializer<mozilla::layers::ScaleMode,
mozilla::layers::SCALE_NONE,
mozilla::layers::SCALE_SENTINEL>
{};

template <>
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/Compositor.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include "mozilla/gfx/Rect.h"
#include "mozilla/gfx/Matrix.h"
#include "gfxMatrix.h"
#include "Layers.h"
#include "mozilla/RefPtr.h"
#include "mozilla/layers/CompositorTypes.h"
#include "Units.h"

/**
* Different elements of a web pages are rendered into separate "layers" before
Expand Down
7 changes: 0 additions & 7 deletions gfx/layers/ImageLayers.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ class ImageContainer;
*/
class ImageLayer : public Layer {
public:
enum ScaleMode {
SCALE_NONE,
SCALE_STRETCH,
SCALE_SENTINEL
// Unimplemented - SCALE_PRESERVE_ASPECT_RATIO_CONTAIN
};

/**
* CONSTRUCTION PHASE ONLY
* Set the ImageContainer. aContainer must have the same layer manager
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/LayerTreeInvalidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ struct ImageLayerProperties : public LayerPropertiesBase
nsRefPtr<ImageContainer> mContainer;
gfxPattern::GraphicsFilter mFilter;
gfxIntSize mScaleToSize;
ImageLayer::ScaleMode mScaleMode;
ScaleMode mScaleMode;
};

LayerPropertiesBase*
Expand Down
7 changes: 7 additions & 0 deletions gfx/layers/LayersTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ struct LayerRenderState {
bool mHasOwnOffset;
};

enum ScaleMode {
SCALE_NONE,
SCALE_STRETCH,
SCALE_SENTINEL
// Unimplemented - SCALE_PRESERVE_ASPECT_RATIO_CONTAIN
};

} // namespace
} // namespace

Expand Down
1 change: 1 addition & 0 deletions gfx/layers/YCbCrImageDataSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "Shmem.h"
#include "gfxPoint.h"
#include "ImageTypes.h"

namespace mozilla {
namespace ipc {
Expand Down
2 changes: 1 addition & 1 deletion gfx/layers/ipc/LayerTransaction.ipdlh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using mozilla::dom::ScreenOrientation;
using mozilla::layers::TextureInfo;
using mozilla::LayerMargin;
using mozilla::LayerPoint;
using mozilla::layers::ImageLayer::ScaleMode;
using mozilla::layers::ScaleMode;
using mozilla::layers::DiagnosticTypes;

namespace mozilla {
Expand Down
2 changes: 1 addition & 1 deletion layout/generic/nsObjectFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ nsObjectFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
}
#endif

imglayer->SetScaleToSize(size, ImageLayer::SCALE_STRETCH);
imglayer->SetScaleToSize(size, SCALE_STRETCH);
imglayer->SetContainer(container);
gfxPattern::GraphicsFilter filter =
nsLayoutUtils::GetGraphicsFilterForFrame(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@

#ifdef MOZILLA_INTERNAL_API
#include "mozilla/net/DataChannel.h"
#include "Layers.h"
#include "VideoUtils.h"
#include "ImageLayers.h"
#include "VideoSegment.h"
#include "nsNSSShutDown.h"
#else
Expand Down
1 change: 1 addition & 0 deletions view/src/nsViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "mozilla/Preferences.h"
#include "nsContentUtils.h" // for nsAutoScriptBlocker
#include "nsLayoutUtils.h"
#include "Layers.h"
#include "mozilla/layers/Compositor.h"

/**
Expand Down

0 comments on commit bf5c77a

Please sign in to comment.