Bug 903819 - Don't include Layers.h everywhere, part 4 r=nrc

This commit is contained in:
David Zbarsky 2013-08-20 15:45:30 -04:00
parent 37576d425e
commit 826b4c099f
14 changed files with 23 additions and 21 deletions

View File

@ -9,6 +9,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/Link.h"
#include "nsContentUtils.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLAnchorElement.h"

View File

@ -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"

View File

@ -16,7 +16,6 @@
#define DASHRepDecoder_h_
#include "Representation.h"
#include "ImageLayers.h"
#include "DASHDecoder.h"
#include "WebMDecoder.h"
#include "WebMReader.h"
@ -24,6 +23,10 @@
namespace mozilla {
namespace layers {
class ImageContainer;
}
class DASHDecoder;
class DASHRepReader;

View File

@ -55,6 +55,7 @@ class PCompositorParent;
namespace dom {
class Element;
class TabParent;
class PStorageParent;
class ClonedMessageData;

View File

@ -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 )
@ -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
@ -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 <>

View File

@ -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

View File

@ -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

View File

@ -335,7 +335,7 @@ struct ImageLayerProperties : public LayerPropertiesBase
nsRefPtr<ImageContainer> mContainer;
gfxPattern::GraphicsFilter mFilter;
gfxIntSize mScaleToSize;
ImageLayer::ScaleMode mScaleMode;
ScaleMode mScaleMode;
};
LayerPropertiesBase*

View File

@ -111,6 +111,13 @@ struct LayerRenderState {
bool mHasOwnOffset;
};
enum ScaleMode {
SCALE_NONE,
SCALE_STRETCH,
SCALE_SENTINEL
// Unimplemented - SCALE_PRESERVE_ASPECT_RATIO_CONTAIN
};
} // namespace
} // namespace

View File

@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "Shmem.h"
#include "gfxPoint.h"
#include "ImageTypes.h"
namespace mozilla {
namespace ipc {

View File

@ -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 {

View File

@ -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);

View File

@ -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

View File

@ -25,6 +25,7 @@
#include "mozilla/Preferences.h"
#include "nsContentUtils.h" // for nsAutoScriptBlocker
#include "nsLayoutUtils.h"
#include "Layers.h"
#include "mozilla/layers/Compositor.h"
/**