Back out 98d2c24ce932 for failing to build r=moron

This commit is contained in:
Joe Drew 2012-08-15 12:51:33 -04:00
parent da49d43ec3
commit 012f6296d7
31 changed files with 227 additions and 227 deletions

View File

@ -330,7 +330,7 @@ AlphaBoxBlur::AlphaBoxBlur(const Rect& aRect,
const Rect* aSkipRect)
: mSpreadRadius(aSpreadRadius),
mBlurRadius(aBlurRadius),
mData(nullptr)
mData(NULL)
{
Rect rect(aRect);
rect.Inflate(Size(aBlurRadius + aSpreadRadius));
@ -424,7 +424,7 @@ AlphaBoxBlur::GetDirtyRect()
return &mDirtyRect;
}
return nullptr;
return NULL;
}
void

View File

@ -45,11 +45,11 @@ public:
*
* @param aDirtyRect A pointer to a dirty rect, measured in device units, if
* available. This will be used for optimizing the blur operation. It is
* safe to pass nullptr here.
* safe to pass NULL here.
*
* @param aSkipRect A pointer to a rect, measured in device units, that
* represents an area where blurring is unnecessary and shouldn't be done for
* speed reasons. It is safe to pass nullptr here.
* speed reasons. It is safe to pass NULL here.
*/
AlphaBoxBlur(const Rect& aRect,
const IntSize& aSpreadRadius,
@ -84,7 +84,7 @@ public:
IntRect GetRect();
/**
* Return a pointer to a dirty rect, as passed in to the constructor, or nullptr
* Return a pointer to a dirty rect, as passed in to the constructor, or NULL
* if none was passed in.
*/
Rect* GetDirtyRect();

View File

@ -77,7 +77,7 @@ CGBlendMode ToBlendMode(CompositionOp op)
DrawTargetCG::DrawTargetCG() : mSnapshot(nullptr)
DrawTargetCG::DrawTargetCG() : mSnapshot(NULL)
{
}
@ -128,7 +128,7 @@ DrawTargetCG::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aForma
if (newTarget->Init(GetType(), aSize, aFormat)) {
return newTarget;
} else {
return nullptr;
return NULL;
}
}
@ -141,7 +141,7 @@ DrawTargetCG::CreateSourceSurfaceFromData(unsigned char *aData,
RefPtr<SourceSurfaceCG> newSurf = new SourceSurfaceCG();
if (!newSurf->InitFromData(aData, aSize, aStride, aFormat)) {
return nullptr;
return NULL;
}
return newSurf;
@ -162,7 +162,7 @@ GetImageFromSourceSurface(SourceSurface *aSurface)
TemporaryRef<SourceSurface>
DrawTargetCG::OptimizeSourceSurface(SourceSurface *aSurface) const
{
return nullptr;
return NULL;
}
class UnboundnessFixer
@ -171,7 +171,7 @@ class UnboundnessFixer
CGLayerRef mLayer;
CGContextRef mCg;
public:
UnboundnessFixer() : mCg(nullptr) {}
UnboundnessFixer() : mCg(NULL) {}
CGContextRef Check(CGContextRef baseCg, CompositionOp blend)
{
@ -182,8 +182,8 @@ class UnboundnessFixer
//XXX: The size here is in default user space units, of the layer relative to the graphics context.
// is the clip bounds still correct if, for example, we have a scale applied to the context?
mLayer = CGLayerCreateWithContext(baseCg, mClipBounds.size, nullptr);
//XXX: if the size is 0x0 we get a nullptr CGContext back from GetContext
mLayer = CGLayerCreateWithContext(baseCg, mClipBounds.size, NULL);
//XXX: if the size is 0x0 we get a NULL CGContext back from GetContext
mCg = CGLayerGetContext(mLayer);
// CGContext's default to have the origin at the bottom left
// so flip it to the top left and adjust for the origin
@ -219,7 +219,7 @@ DrawTargetCG::DrawSurface(SourceSurface *aSurface,
MarkChanged();
CGImageRef image;
CGImageRef subimage = nullptr;
CGImageRef subimage = NULL;
CGContextSaveGState(mCg);
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
@ -429,7 +429,7 @@ SetFillFromPattern(CGContextRef cg, CGColorSpaceRef aColorSpace, const Pattern &
} else if (aPattern.GetType() == PATTERN_SURFACE) {
CGColorSpaceRef patternSpace;
patternSpace = CGColorSpaceCreatePattern (nullptr);
patternSpace = CGColorSpaceCreatePattern (NULL);
CGContextSetFillColorSpace(cg, patternSpace);
CGColorSpaceRelease(patternSpace);
@ -452,7 +452,7 @@ SetStrokeFromPattern(CGContextRef cg, CGColorSpaceRef aColorSpace, const Pattern
CGColorRelease(cgcolor);
} else if (aPattern.GetType() == PATTERN_SURFACE) {
CGColorSpaceRef patternSpace;
patternSpace = CGColorSpaceCreatePattern (nullptr);
patternSpace = CGColorSpaceCreatePattern (NULL);
CGContextSetStrokeColorSpace(cg, patternSpace);
CGColorSpaceRelease(patternSpace);
@ -756,7 +756,7 @@ DrawTargetCG::CopySurface(SourceSurface *aSurface,
MarkChanged();
CGImageRef image;
CGImageRef subimage = nullptr;
CGImageRef subimage = NULL;
if (aSurface->GetType() == SURFACE_COREGRAPHICS_IMAGE) {
image = GetImageFromSourceSurface(aSurface);
/* we have two options here:
@ -830,9 +830,9 @@ DrawTargetCG::Init(BackendType aType,
// 32767 is the maximum size supported by cairo
// we clamp to that to make it easier to interoperate
aSize.width > 32767 || aSize.height > 32767) {
mColorSpace = nullptr;
mCg = nullptr;
mData = nullptr;
mColorSpace = NULL;
mCg = NULL;
mData = NULL;
return false;
}
@ -841,14 +841,14 @@ DrawTargetCG::Init(BackendType aType,
//XXX: we'd be better off reusing the Colorspace across draw targets
mColorSpace = CGColorSpaceCreateDeviceRGB();
if (aData == nullptr && aType != BACKEND_COREGRAPHICS_ACCELERATED) {
if (aData == NULL && aType != BACKEND_COREGRAPHICS_ACCELERATED) {
// XXX: Currently, Init implicitly clears, that can often be a waste of time
mData = calloc(aSize.height * aStride, 1);
aData = static_cast<unsigned char*>(mData);
} else {
// mData == nullptr means DrawTargetCG doesn't own the image data and will not
// mData == NULL means DrawTargetCG doesn't own the image data and will not
// delete it in the destructor
mData = nullptr;
mData = NULL;
}
mSize = aSize;
@ -858,7 +858,7 @@ DrawTargetCG::Init(BackendType aType,
mCg = ioSurface->CreateIOSurfaceContext();
// If we don't have the symbol for 'CreateIOSurfaceContext' mCg will be null
// and we will fallback to software below
mData = nullptr;
mData = NULL;
}
if (!mCg || aType == BACKEND_COREGRAPHICS) {
@ -916,9 +916,9 @@ DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize)
// XXX: we should come up with some consistent semantics for dealing
// with zero area drawtargets
if (aSize.width == 0 || aSize.height == 0) {
mColorSpace = nullptr;
mCg = nullptr;
mData = nullptr;
mColorSpace = NULL;
mCg = NULL;
mData = NULL;
return false;
}
@ -931,7 +931,7 @@ DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize)
mCg = cgContext;
mData = nullptr;
mData = NULL;
assert(mCg);
// CGContext's default to have the origin at the bottom left
@ -950,8 +950,8 @@ DrawTargetCG::Init(BackendType aType, const IntSize &aSize, SurfaceFormat &aForm
{
int stride = aSize.width*4;
// Calling Init with aData == nullptr will allocate.
return Init(aType, nullptr, aSize, stride, aFormat);
// Calling Init with aData == NULL will allocate.
return Init(aType, NULL, aSize, stride, aFormat);
}
TemporaryRef<PathBuilder>
@ -968,7 +968,7 @@ DrawTargetCG::GetNativeSurface(NativeSurfaceType aType)
aType == NATIVE_SURFACE_CGCONTEXT_ACCELERATED && GetContextType(mCg) == CG_CONTEXT_TYPE_IOSURFACE) {
return mCg;
} else {
return nullptr;
return NULL;
}
}
@ -1066,7 +1066,7 @@ DrawTargetCG::MarkChanged()
// We only need to worry about snapshots that someone else knows about
mSnapshot->DrawTargetWillChange();
}
mSnapshot = nullptr;
mSnapshot = NULL;
}
}

View File

@ -124,7 +124,7 @@ public:
virtual void PushClip(const Path *);
virtual void PushClipRect(const Rect &aRect);
virtual void PopClip();
virtual TemporaryRef<SourceSurface> CreateSourceSurfaceFromNativeSurface(const NativeSurface&) const { return nullptr;}
virtual TemporaryRef<SourceSurface> CreateSourceSurfaceFromNativeSurface(const NativeSurface&) const { return NULL;}
virtual TemporaryRef<DrawTarget> CreateSimilarDrawTarget(const IntSize &, SurfaceFormat) const;
virtual TemporaryRef<PathBuilder> CreatePathBuilder(FillRule) const;
virtual TemporaryRef<GradientStops> CreateGradientStops(GradientStop *, uint32_t,
@ -155,7 +155,7 @@ private:
/**
* A pointer to the image buffer if the buffer is owned by this class (set to
* nullptr otherwise).
* NULL otherwise).
* The data is not considered owned by DrawTargetCG if the DrawTarget was
* created for a pre-existing buffer or if the buffer's lifetime is managed
* by CoreGraphics.

View File

@ -164,7 +164,7 @@ GetCairoSurfaceForSourceSurface(SourceSurface *aSurface)
return surf;
}
// Never returns nullptr. As such, you must always pass in Cairo-compatible
// Never returns NULL. As such, you must always pass in Cairo-compatible
// patterns, most notably gradients with a GradientStopCairo.
// The pattern returned must have cairo_pattern_destroy() called on it by the
// caller.
@ -275,7 +275,7 @@ NeedIntermediateSurface(const Pattern& aPattern, const DrawOptions& aOptions)
}
DrawTargetCairo::DrawTargetCairo()
: mContext(nullptr)
: mContext(NULL)
{
}
@ -318,7 +318,7 @@ DrawTargetCairo::Flush()
}
void
DrawTargetCairo::PrepareForDrawing(cairo_t* aContext, const Path* aPath /* = nullptr */)
DrawTargetCairo::PrepareForDrawing(cairo_t* aContext, const Path* aPath /* = NULL */)
{
WillChange(aPath);
}
@ -391,7 +391,7 @@ DrawTargetCairo::DrawSurfaceWithShadow(SourceSurface *aSurface,
AlphaBoxBlur blur(extents, IntSize(0, 0),
AlphaBoxBlur::CalculateBlurRadius(Point(aSigma, aSigma)),
nullptr, nullptr);
NULL, NULL);
if (!blur.GetData()) {
return;
}
@ -786,7 +786,7 @@ DrawTargetCairo::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurf
}
}
return nullptr;
return NULL;
}
TemporaryRef<DrawTarget>
@ -802,7 +802,7 @@ DrawTargetCairo::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFo
return target;
}
return nullptr;
return NULL;
}
bool
@ -824,7 +824,7 @@ DrawTargetCairo::GetNativeSurface(NativeSurfaceType aType)
return cairo_get_target(mContext);
}
return nullptr;
return NULL;
}
void
@ -857,7 +857,7 @@ DrawTargetCairo::RemoveSnapshot(SourceSurfaceCairo* aSnapshot)
}
void
DrawTargetCairo::WillChange(const Path* aPath /* = nullptr */)
DrawTargetCairo::WillChange(const Path* aPath /* = NULL */)
{
if (!mSnapshots.empty()) {
for (std::vector<SourceSurfaceCairo*>::iterator iter = mSnapshots.begin();
@ -871,7 +871,7 @@ DrawTargetCairo::WillChange(const Path* aPath /* = nullptr */)
if (mPathObserver &&
(!aPath || !mPathObserver->ContainsPath(aPath))) {
mPathObserver->PathWillChange();
mPathObserver = nullptr;
mPathObserver = NULL;
}
}

View File

@ -95,7 +95,7 @@ public:
const GlyphBuffer &aBuffer,
const Pattern &aPattern,
const DrawOptions &aOptions,
const GlyphRenderingOptions *aRenderingOptions = nullptr);
const GlyphRenderingOptions *aRenderingOptions = NULL);
virtual void Mask(const Pattern &aSource,
const Pattern &aMask,
const DrawOptions &aOptions = DrawOptions());
@ -132,7 +132,7 @@ public:
// Call to set up aContext for drawing (with the current transform, etc).
// Pass the path you're going to be using if you have one.
// Implicitly calls WillChange(aPath).
void PrepareForDrawing(cairo_t* aContext, const Path* aPath = nullptr);
void PrepareForDrawing(cairo_t* aContext, const Path* aPath = NULL);
private: // methods
enum DrawPatternType { DRAW_FILL, DRAW_STROKE };
@ -149,7 +149,7 @@ private: // methods
// Call before you make any changes to the backing surface with which this
// context is associated. Pass the path you're going to be using if you have
// one.
void WillChange(const Path* aPath = nullptr);
void WillChange(const Path* aPath = NULL);
// Call if there is any reason to disassociate all snapshots from this draw
// target; for example, because we're going to be destroyed.

View File

@ -79,7 +79,7 @@ public:
1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
HRESULT hr = mDT->mDevice->CreateTexture2D(&desc, nullptr, byRef(tmpTexture));
HRESULT hr = mDT->mDevice->CreateTexture2D(&desc, NULL, byRef(tmpTexture));
if (FAILED(hr)) {
gfxWarning() << "Failed to create temporary texture to hold surface data.";
}
@ -128,7 +128,7 @@ public:
RefPtr<ID2D1GeometrySink> sink;
invClippedArea->Open(byRef(sink));
rectGeom->CombineWithGeometry(mClippedArea, D2D1_COMBINE_MODE_EXCLUDE, nullptr, sink);
rectGeom->CombineWithGeometry(mClippedArea, D2D1_COMBINE_MODE_EXCLUDE, NULL, sink);
sink->Close();
RefPtr<ID2D1BitmapBrush> brush;
@ -151,7 +151,7 @@ private:
DrawTargetD2D::DrawTargetD2D()
: mCurrentCachedLayer(0)
, mClipsArePushed(false)
, mPrivateData(nullptr)
, mPrivateData(NULL)
{
}
@ -183,7 +183,7 @@ DrawTargetD2D::~DrawTargetD2D()
for (int i = 0; i < kLayerCacheSize; i++) {
if (mCachedLayers[i]) {
mCachedLayers[i] = nullptr;
mCachedLayers[i] = NULL;
mVRAMUsageDT -= GetByteSize();
}
}
@ -320,7 +320,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
Float aSigma,
CompositionOp aOperator)
{
RefPtr<ID3D10ShaderResourceView> srView = nullptr;
RefPtr<ID3D10ShaderResourceView> srView = NULL;
if (aSurface->GetType() != SURFACE_D2D1_DRAWTARGET) {
return;
}
@ -342,7 +342,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
if (!mTempRTView) {
// This view is only needed in this path.
HRESULT hr = mDevice->CreateRenderTargetView(mTempTexture, nullptr, byRef(mTempRTView));
HRESULT hr = mDevice->CreateRenderTargetView(mTempTexture, NULL, byRef(mTempRTView));
if (FAILED(hr)) {
gfxWarning() << "Failure to create RenderTargetView. Code: " << hr;
@ -360,7 +360,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
if (mPushedClips.size()) {
EnsureClipMaskTexture();
mDevice->CreateShaderResourceView(mCurrentClipMaskTexture, nullptr, byRef(maskSRView));
mDevice->CreateShaderResourceView(mCurrentClipMaskTexture, NULL, byRef(maskSRView));
}
IntSize srcSurfSize;
@ -402,7 +402,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
desc.MiscFlags = D3D10_RESOURCE_MISC_GENERATE_MIPS;
RefPtr<ID3D10Texture2D> mipTexture;
hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(mipTexture));
hr = mDevice->CreateTexture2D(&desc, NULL, byRef(mipTexture));
if (FAILED(hr)) {
gfxWarning() << "Failure to create temporary texture. Size: " <<
@ -430,7 +430,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
dsSize.height, 1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
RefPtr<ID3D10Texture2D> tmpDSTexture;
hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(tmpDSTexture));
hr = mDevice->CreateTexture2D(&desc, NULL, byRef(tmpDSTexture));
if (FAILED(hr)) {
gfxWarning() << "Failure to create temporary texture. Size: " << dsSize << " Code: " << hr;
@ -444,13 +444,13 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
box.bottom = aSurface->GetSize().height;
mDevice->CopySubresourceRegion(mipTexture, 0, 0, 0, 0, static_cast<SourceSurfaceD2DTarget*>(aSurface)->mTexture, 0, &box);
mDevice->CreateShaderResourceView(mipTexture, nullptr, byRef(srView));
mDevice->CreateShaderResourceView(mipTexture, NULL, byRef(srView));
mDevice->GenerateMips(srView);
RefPtr<ID3D10RenderTargetView> dsRTView;
RefPtr<ID3D10ShaderResourceView> dsSRView;
mDevice->CreateRenderTargetView(tmpDSTexture, nullptr, byRef(dsRTView));
mDevice->CreateShaderResourceView(tmpDSTexture, nullptr, byRef(dsSRView));
mDevice->CreateRenderTargetView(tmpDSTexture, NULL, byRef(dsRTView));
mDevice->CreateShaderResourceView(tmpDSTexture, NULL, byRef(dsSRView));
// We're not guaranteed the texture we created will be empty, we've
// seen old content at least on NVidia drivers.
@ -458,7 +458,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
mDevice->ClearRenderTargetView(dsRTView, color);
rtViews = dsRTView;
mDevice->OMSetRenderTargets(1, &rtViews, nullptr);
mDevice->OMSetRenderTargets(1, &rtViews, NULL);
viewport.MaxDepth = 1;
viewport.MinDepth = 0;
@ -472,7 +472,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
mPrivateData->mEffect->GetTechniqueByName("SampleTexture")->
GetPassByIndex(0)->Apply(0);
mDevice->OMSetBlendState(GetBlendStateForOperator(OP_OVER), nullptr, 0xffffffff);
mDevice->OMSetBlendState(GetBlendStateForOperator(OP_OVER), NULL, 0xffffffff);
mDevice->Draw(4, 0);
@ -541,15 +541,15 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
mDevice->CreateTexture2D(&desc, nullptr, byRef(tmpTexture));
mDevice->CreateRenderTargetView(tmpTexture, nullptr, byRef(tmpRTView));
mDevice->CreateShaderResourceView(tmpTexture, nullptr, byRef(tmpSRView));
mDevice->CreateTexture2D(&desc, NULL, byRef(tmpTexture));
mDevice->CreateRenderTargetView(tmpTexture, NULL, byRef(tmpRTView));
mDevice->CreateShaderResourceView(tmpTexture, NULL, byRef(tmpSRView));
tmpSurfSize = srcSurfSize;
}
rtViews = tmpRTView;
mDevice->OMSetRenderTargets(1, &rtViews, nullptr);
mDevice->OMSetRenderTargets(1, &rtViews, NULL);
mPrivateData->mEffect->GetVariableByName("tex")->AsShaderResource()->SetResource(srView);
@ -593,7 +593,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
mPrivateData->mEffect->GetVariableByName("tex")->AsShaderResource()->SetResource(tmpSRView);
rtViews = destRTView;
mDevice->OMSetRenderTargets(1, &rtViews, nullptr);
mDevice->OMSetRenderTargets(1, &rtViews, NULL);
Point shadowDest = aDest + aOffset;
@ -619,7 +619,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
GetPassByIndex(1)->Apply(0);
}
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), nullptr, 0xffffffff);
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), NULL, 0xffffffff);
mDevice->Draw(4, 0);
@ -644,7 +644,7 @@ DrawTargetD2D::DrawSurfaceWithShadow(SourceSurface *aSurface,
GetPassByIndex(0)->Apply(0);
}
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), nullptr, 0xffffffff);
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), NULL, 0xffffffff);
mDevice->Draw(4, 0);
}
@ -868,7 +868,7 @@ DrawTargetD2D::FillGlyphs(ScaledFont *aFont,
ScaledFontDWrite *font = static_cast<ScaledFontDWrite*>(aFont);
IDWriteRenderingParams *params = nullptr;
IDWriteRenderingParams *params = NULL;
if (aRenderOptions) {
if (aRenderOptions->GetType() != FONT_DWRITE) {
gfxDebug() << *this << ": Ignoring incompatible GlyphRenderingOptions.";
@ -927,7 +927,7 @@ DrawTargetD2D::Mask(const Pattern &aSource,
layer = GetCachedLayer();
rt->PushLayer(D2D1::LayerParameters(D2D1::InfiniteRect(), nullptr,
rt->PushLayer(D2D1::LayerParameters(D2D1::InfiniteRect(), NULL,
D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
D2D1::IdentityMatrix(),
1.0f, maskBrush),
@ -951,8 +951,8 @@ DrawTargetD2D::PushClip(const Path *aPath)
return;
}
mCurrentClipMaskTexture = nullptr;
mCurrentClippedGeometry = nullptr;
mCurrentClipMaskTexture = NULL;
mCurrentClippedGeometry = NULL;
RefPtr<PathD2D> pathD2D = static_cast<PathD2D*>(const_cast<Path*>(aPath));
@ -980,7 +980,7 @@ DrawTargetD2D::PushClip(const Path *aPath)
mRT->PushLayer(D2D1::LayerParameters(D2D1::InfiniteRect(), pathD2D->mGeometry,
D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
clip.mTransform, 1.0f, nullptr,
clip.mTransform, 1.0f, NULL,
options), clip.mLayer);
}
}
@ -988,8 +988,8 @@ DrawTargetD2D::PushClip(const Path *aPath)
void
DrawTargetD2D::PushClipRect(const Rect &aRect)
{
mCurrentClipMaskTexture = nullptr;
mCurrentClippedGeometry = nullptr;
mCurrentClipMaskTexture = NULL;
mCurrentClippedGeometry = NULL;
if (!mTransform.IsRectilinear()) {
// Whoops, this isn't a rectangle in device space, Direct2D will not deal
// with this transform the way we want it to.
@ -1021,8 +1021,8 @@ DrawTargetD2D::PushClipRect(const Rect &aRect)
void
DrawTargetD2D::PopClip()
{
mCurrentClipMaskTexture = nullptr;
mCurrentClippedGeometry = nullptr;
mCurrentClipMaskTexture = NULL;
mCurrentClippedGeometry = NULL;
if (mClipsArePushed) {
if (mPushedClips.back().mLayer) {
PopCachedLayer(mRT);
@ -1042,7 +1042,7 @@ DrawTargetD2D::CreateSourceSurfaceFromData(unsigned char *aData,
RefPtr<SourceSurfaceD2D> newSurf = new SourceSurfaceD2D();
if (!newSurf->InitFromData(aData, aSize, aStride, aFormat, mRT)) {
return nullptr;
return NULL;
}
return newSurf;
@ -1052,7 +1052,7 @@ TemporaryRef<SourceSurface>
DrawTargetD2D::OptimizeSourceSurface(SourceSurface *aSurface) const
{
// Unsupported!
return nullptr;
return NULL;
}
TemporaryRef<SourceSurface>
@ -1060,7 +1060,7 @@ DrawTargetD2D::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurfac
{
if (aSurface.mType != NATIVE_SURFACE_D3D10_TEXTURE) {
gfxDebug() << *this << ": Failure to create source surface from non-D3D10 texture native surface.";
return nullptr;
return NULL;
}
RefPtr<SourceSurfaceD2D> newSurf = new SourceSurfaceD2D();
@ -1069,7 +1069,7 @@ DrawTargetD2D::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurfac
mRT))
{
gfxWarning() << *this << ": Failed to create SourceSurface from texture.";
return nullptr;
return NULL;
}
return newSurf;
@ -1083,7 +1083,7 @@ DrawTargetD2D::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aForm
if (!newTarget->Init(aSize, aFormat)) {
gfxDebug() << *this << ": Failed to create optimal draw target. Size: " << aSize;
return nullptr;
return NULL;
}
return newTarget;
@ -1097,14 +1097,14 @@ DrawTargetD2D::CreatePathBuilder(FillRule aFillRule) const
if (FAILED(hr)) {
gfxWarning() << "Failed to create Direct2D Path Geometry. Code: " << hr;
return nullptr;
return NULL;
}
RefPtr<ID2D1GeometrySink> sink;
hr = path->Open(byRef(sink));
if (FAILED(hr)) {
gfxWarning() << "Failed to access Direct2D Path Geometry. Code: " << hr;
return nullptr;
return NULL;
}
if (aFillRule == FILL_WINDING) {
@ -1134,7 +1134,7 @@ DrawTargetD2D::CreateGradientStops(GradientStop *rawStops, uint32_t aNumStops, E
if (FAILED(hr)) {
gfxWarning() << "Failed to create GradientStopCollection. Code: " << hr;
return nullptr;
return NULL;
}
return new GradientStopsD2D(stopCollection);
@ -1144,7 +1144,7 @@ void*
DrawTargetD2D::GetNativeSurface(NativeSurfaceType aType)
{
if (aType != NATIVE_SURFACE_D3D10_TEXTURE) {
return nullptr;
return NULL;
}
return mTexture;
@ -1173,7 +1173,7 @@ DrawTargetD2D::Init(const IntSize &aSize, SurfaceFormat aFormat)
1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(mTexture));
hr = mDevice->CreateTexture2D(&desc, NULL, byRef(mTexture));
if (FAILED(hr)) {
gfxDebug() << "Failed to init Direct2D DrawTarget. Size: " << mSize << " Code: " << hr;
@ -1243,7 +1243,7 @@ DrawTargetD2D::InitD3D10Data()
createD3DEffect = (D3D10CreateEffectFromMemoryFunc)
GetProcAddress(d3dModule, "D3D10CreateEffectFromMemory");
hr = createD3DEffect((void*)d2deffect, sizeof(d2deffect), 0, mDevice, nullptr, byRef(mPrivateData->mEffect));
hr = createD3DEffect((void*)d2deffect, sizeof(d2deffect), 0, mDevice, NULL, byRef(mPrivateData->mEffect));
if (FAILED(hr)) {
gfxWarning() << "Failed to initialize Direct2D required effects. Code: " << hr;
@ -1375,7 +1375,7 @@ DrawTargetD2D::MarkChanged()
if (mSnapshot) {
if (mSnapshot->hasOneRef()) {
// Just destroy it, since no-one else knows about it.
mSnapshot = nullptr;
mSnapshot = NULL;
} else {
mSnapshot->DrawTargetWillChange();
// The snapshot will no longer depend on this target.
@ -1533,7 +1533,7 @@ DrawTargetD2D::FinalizeRTForOperation(CompositionOp aOperator, const Pattern &aP
}
ID3D10RenderTargetView *rtViews = mRTView;
mDevice->OMSetRenderTargets(1, &rtViews, nullptr);
mDevice->OMSetRenderTargets(1, &rtViews, NULL);
UINT stride = sizeof(Vertex);
UINT offset = 0;
@ -1573,7 +1573,7 @@ DrawTargetD2D::FinalizeRTForOperation(CompositionOp aOperator, const Pattern &aP
SetupEffectForRadialGradient(pat);
}
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), nullptr, 0xffffffff);
mDevice->OMSetBlendState(GetBlendStateForOperator(aOperator), NULL, 0xffffffff);
mDevice->Draw(4, 0);
}
@ -1671,7 +1671,7 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm
if (FAILED(hr)) {
gfxWarning() << "Failed to QI texture to surface.";
return nullptr;
return NULL;
}
D3D10_TEXTURE2D_DESC desc;
@ -1689,7 +1689,7 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm
if (FAILED(hr)) {
gfxWarning() << "Failed to create D2D render target for texture.";
return nullptr;
return NULL;
}
return rt;
@ -1710,7 +1710,7 @@ DrawTargetD2D::EnsureViews()
1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(mTempTexture));
hr = mDevice->CreateTexture2D(&desc, NULL, byRef(mTempTexture));
if (FAILED(hr)) {
gfxWarning() << *this << "Failed to create temporary texture for rendertarget. Size: "
@ -1718,14 +1718,14 @@ DrawTargetD2D::EnsureViews()
return;
}
hr = mDevice->CreateShaderResourceView(mTempTexture, nullptr, byRef(mSRView));
hr = mDevice->CreateShaderResourceView(mTempTexture, NULL, byRef(mSRView));
if (FAILED(hr)) {
gfxWarning() << *this << "Failed to create shader resource view for temp texture. Code: " << hr;
return;
}
hr = mDevice->CreateRenderTargetView(mTexture, nullptr, byRef(mRTView));
hr = mDevice->CreateRenderTargetView(mTexture, NULL, byRef(mRTView));
if (FAILED(hr)) {
gfxWarning() << *this << "Failed to create rendertarget view for temp texture. Code: " << hr;
@ -1756,7 +1756,7 @@ DrawTargetD2D::PushClipsToRT(ID2D1RenderTarget *aRT)
aRT->PushLayer(D2D1::LayerParameters(D2D1::InfiniteRect(), iter->mPath->mGeometry,
D2D1_ANTIALIAS_MODE_PER_PRIMITIVE,
iter->mTransform, 1.0f, nullptr,
iter->mTransform, 1.0f, NULL,
options), iter->mLayer);
} else {
aRT->PushAxisAlignedClip(iter->mBounds, D2D1_ANTIALIAS_MODE_PER_PRIMITIVE);
@ -1789,7 +1789,7 @@ DrawTargetD2D::EnsureClipMaskTexture()
1, 1);
desc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
HRESULT hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(mCurrentClipMaskTexture));
HRESULT hr = mDevice->CreateTexture2D(&desc, NULL, byRef(mCurrentClipMaskTexture));
if (FAILED(hr)) {
gfxWarning() << "Failed to create texture for ClipMask!";
@ -1909,7 +1909,7 @@ DrawTargetD2D::FillGlyphsManual(ScaledFontDWrite *aFont,
}
RefPtr<ID3D10ShaderResourceView> srView;
hr = mDevice->CreateShaderResourceView(tex, nullptr, byRef(srView));
hr = mDevice->CreateShaderResourceView(tex, NULL, byRef(srView));
if (FAILED(hr)) {
return false;
@ -1960,7 +1960,7 @@ DrawTargetD2D::FillGlyphsManual(ScaledFontDWrite *aFont,
EnsureClipMaskTexture();
RefPtr<ID3D10ShaderResourceView> srViewMask;
hr = mDevice->CreateShaderResourceView(mCurrentClipMaskTexture, nullptr, byRef(srViewMask));
hr = mDevice->CreateShaderResourceView(mCurrentClipMaskTexture, NULL, byRef(srViewMask));
if (FAILED(hr)) {
return false;
@ -1979,10 +1979,10 @@ DrawTargetD2D::FillGlyphsManual(ScaledFontDWrite *aFont,
RefPtr<ID3D10RenderTargetView> rtView;
ID3D10RenderTargetView *rtViews;
mDevice->CreateRenderTargetView(mTexture, nullptr, byRef(rtView));
mDevice->CreateRenderTargetView(mTexture, NULL, byRef(rtView));
rtViews = rtView;
mDevice->OMSetRenderTargets(1, &rtViews, nullptr);
mDevice->OMSetRenderTargets(1, &rtViews, NULL);
mDevice->Draw(4, 0);
return true;
@ -2014,7 +2014,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
if (!stops) {
gfxDebug() << "No stops specified for gradient pattern.";
return nullptr;
return NULL;
}
if (pat->mBegin == pat->mEnd) {
@ -2043,7 +2043,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
if (!stops) {
gfxDebug() << "No stops specified for gradient pattern.";
return nullptr;
return NULL;
}
// This will not be a complex radial gradient brush.
@ -2063,7 +2063,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
if (!pat->mSurface) {
gfxDebug() << "No source surface specified for surface pattern";
return nullptr;
return NULL;
}
RefPtr<ID2D1Bitmap> bitmap;
@ -2078,7 +2078,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
bitmap = surf->mBitmap;
if (!bitmap) {
return nullptr;
return NULL;
}
}
break;
@ -2097,7 +2097,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
bitmap = CreatePartialBitmapForSurface(dataSurf, mat, pat->mExtendMode);
if (!bitmap) {
return nullptr;
return NULL;
}
}
break;
@ -2116,7 +2116,7 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
}
gfxWarning() << "Invalid pattern type detected.";
return nullptr;
return NULL;
}
TemporaryRef<ID2D1StrokeStyle>
@ -2183,7 +2183,7 @@ DrawTargetD2D::CreateStrokeStyleForOptions(const StrokeOptions &aStrokeOptions)
D2D1::StrokeStyleProperties(capStyle, capStyle,
capStyle, joinStyle,
aStrokeOptions.mMiterLimit),
nullptr, 0, byRef(style));
NULL, 0, byRef(style));
}
if (FAILED(hr)) {
@ -2285,7 +2285,7 @@ DrawTargetD2D::CreateTextureForAnalysis(IDWriteGlyphRunAnalysis *aAnalysis, cons
if (FAILED(hr)) {
delete [] texture;
return nullptr;
return NULL;
}
int alignedBufferSize = aBounds.width * aBounds.height * 4;
@ -2324,7 +2324,7 @@ DrawTargetD2D::CreateTextureForAnalysis(IDWriteGlyphRunAnalysis *aAnalysis, cons
delete [] texture;
if (FAILED(hr)) {
return nullptr;
return NULL;
}
return tex;
@ -2344,7 +2344,7 @@ DrawTargetD2D::CreatePartialBitmapForSurface(DataSourceSurface *aSurface, Matrix
Matrix invTransform = transform = aMatrix * transform;
if (!invTransform.Invert()) {
// Singular transform, nothing to be drawn.
return nullptr;
return NULL;
}
Rect rect(0, 0, mSize.width, mSize.height);
@ -2412,7 +2412,7 @@ DrawTargetD2D::CreatePartialBitmapForSurface(DataSourceSurface *aSurface, Matrix
if (Bpp != 4) {
// This shouldn't actually happen in practice!
MOZ_ASSERT(false);
return nullptr;
return NULL;
}
ImageHalfScaler scaler(aSurface->GetData(), stride, size);
@ -2469,7 +2469,7 @@ DrawTargetD2D::SetupEffectForRadialGradient(const RadialGradientPattern *aPatter
RefPtr<ID3D10Texture2D> tex = CreateGradientTexture(stops);
RefPtr<ID3D10ShaderResourceView> srView;
mDevice->CreateShaderResourceView(tex, nullptr, byRef(srView));
mDevice->CreateShaderResourceView(tex, NULL, byRef(srView));
mPrivateData->mEffect->GetVariableByName("tex")->AsShaderResource()->SetResource(srView);
@ -2563,7 +2563,7 @@ DrawTargetD2D::factory()
if (!createD2DFactory) {
gfxWarning() << "Failed to locate D2D1CreateFactory function.";
return nullptr;
return NULL;
}
D2D1_FACTORY_OPTIONS options;
@ -2599,7 +2599,7 @@ DrawTargetD2D::GetDWriteFactory()
if (!createDWriteFactory) {
gfxWarning() << "Failed to locate DWriteCreateFactory function.";
return nullptr;
return NULL;
}
HRESULT hr = createDWriteFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(IDWriteFactory),

View File

@ -91,7 +91,7 @@ public:
const GlyphBuffer &aBuffer,
const Pattern &aPattern,
const DrawOptions &aOptions = DrawOptions(),
const GlyphRenderingOptions *aRenderingOptions = nullptr);
const GlyphRenderingOptions *aRenderingOptions = NULL);
virtual void Mask(const Pattern &aSource,
const Pattern &aMask,
const DrawOptions &aOptions = DrawOptions());

View File

@ -124,7 +124,7 @@ public:
virtual void *GetNativeSurface(NativeSurfaceType aType)
{
return nullptr;
return NULL;
}
private:
@ -135,4 +135,4 @@ private:
}
}
#endif /* MOZILLA_GFX_DRAWTARGETDUAL_H_ */
#endif /* MOZILLA_GFX_DRAWTARGETDUAL_H_ */

View File

@ -162,7 +162,7 @@ DrawTargetSkia::Snapshot()
{
RefPtr<SourceSurfaceSkia> source = new SourceSurfaceSkia();
if (!source->InitWithBitmap(mBitmap, mFormat, this)) {
return nullptr;
return NULL;
}
AppendSnapshot(source);
return source;
@ -311,7 +311,7 @@ struct AutoPaintSetup {
temp.setXfermodeMode(GfxOpToSkiaOp(aOptions.mCompositionOp));
temp.setAlpha(aOptions.mAlpha*255);
//TODO: Get a rect here
mCanvas->saveLayer(nullptr, &temp);
mCanvas->saveLayer(NULL, &temp);
mNeedsRestore = true;
} else {
mPaint.setAlpha(aOptions.mAlpha*255.0);
@ -591,7 +591,7 @@ DrawTargetSkia::CreateSourceSurfaceFromData(unsigned char *aData,
if (!newSurf->InitFromData(aData, aSize, aStride, aFormat)) {
gfxDebug() << *this << ": Failure to create source surface from data. Size: " << aSize;
return nullptr;
return NULL;
}
return newSurf;
@ -602,7 +602,7 @@ DrawTargetSkia::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFor
{
RefPtr<DrawTargetSkia> target = new DrawTargetSkia();
if (!target->Init(aSize, aFormat)) {
return nullptr;
return NULL;
}
return target;
}
@ -610,13 +610,13 @@ DrawTargetSkia::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFor
TemporaryRef<SourceSurface>
DrawTargetSkia::OptimizeSourceSurface(SourceSurface *aSurface) const
{
return nullptr;
return NULL;
}
TemporaryRef<SourceSurface>
DrawTargetSkia::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurface) const
{
return nullptr;
return NULL;
}
void

View File

@ -66,7 +66,7 @@ public:
const GlyphBuffer &aBuffer,
const Pattern &aPattern,
const DrawOptions &aOptions = DrawOptions(),
const GlyphRenderingOptions *aRenderingOptions = nullptr);
const GlyphRenderingOptions *aRenderingOptions = NULL);
virtual void Mask(const Pattern &aSource,
const Pattern &aMask,
const DrawOptions &aOptions = DrawOptions());

View File

@ -196,12 +196,12 @@ Factory::CreateDrawTarget(BackendType aBackend, const IntSize &aSize, SurfaceFor
#endif
default:
gfxDebug() << "Invalid draw target type specified.";
return nullptr;
return NULL;
}
gfxDebug() << "Failed to create DrawTarget, Type: " << aBackend << " Size: " << aSize;
// Failed
return nullptr;
return NULL;
}
TemporaryRef<DrawTarget>
@ -232,12 +232,12 @@ Factory::CreateDrawTargetForData(BackendType aBackend,
#endif
default:
gfxDebug() << "Invalid draw target type specified.";
return nullptr;
return NULL;
}
gfxDebug() << "Failed to create DrawTarget, Type: " << aBackend << " Size: " << aSize;
// Failed
return nullptr;
return NULL;
}
TemporaryRef<ScaledFont>
@ -278,7 +278,7 @@ Factory::CreateScaledFontForNativeFont(const NativeFont &aNativeFont, Float aSiz
#endif
default:
gfxWarning() << "Invalid native font type specified.";
return nullptr;
return NULL;
}
}
@ -294,7 +294,7 @@ Factory::CreateScaledFontWithCairo(const NativeFont& aNativeFont, Float aSize, c
static_cast<ScaledFontBase*>(font.get())->SetCairoScaledFont(aScaledFont);
return font;
#else
return nullptr;
return NULL;
#endif
}
@ -312,7 +312,7 @@ Factory::CreateDrawTargetForD3D10Texture(ID3D10Texture2D *aTexture, SurfaceForma
gfxWarning() << "Failed to create draw target for D3D10 texture.";
// Failed
return nullptr;
return NULL;
}
TemporaryRef<DrawTarget>
@ -326,13 +326,13 @@ Factory::CreateDualDrawTargetForD3D10Textures(ID3D10Texture2D *aTextureA,
newTargetA = new DrawTargetD2D();
if (!newTargetA->Init(aTextureA, aFormat)) {
gfxWarning() << "Failed to create draw target for D3D10 texture.";
return nullptr;
return NULL;
}
newTargetB = new DrawTargetD2D();
if (!newTargetB->Init(aTextureB, aFormat)) {
gfxWarning() << "Failed to create draw target for D3D10 texture.";
return nullptr;
return NULL;
}
RefPtr<DrawTarget> newTarget =
@ -386,7 +386,7 @@ Factory::CreateDrawTargetForCairoSurface(cairo_surface_t* aSurface, const IntSiz
}
#endif
return nullptr;
return NULL;
}
TemporaryRef<DataSourceSurface>
@ -400,7 +400,7 @@ Factory::CreateWrappingDataSourceSurface(uint8_t *aData, int32_t aStride,
return newSurf;
}
return nullptr;
return NULL;
}
}

View File

@ -19,7 +19,7 @@ class ImageHalfScaler
public:
ImageHalfScaler(uint8_t *aData, int32_t aStride, const IntSize &aSize)
: mOrigData(aData), mOrigStride(aStride), mOrigSize(aSize)
, mDataStorage(nullptr)
, mDataStorage(NULL)
{
}

View File

@ -19,7 +19,7 @@ PathBuilderCG::~PathBuilderCG()
void
PathBuilderCG::MoveTo(const Point &aPoint)
{
CGPathMoveToPoint(mCGPath, nullptr, aPoint.x, aPoint.y);
CGPathMoveToPoint(mCGPath, NULL, aPoint.x, aPoint.y);
}
void
@ -28,7 +28,7 @@ PathBuilderCG::LineTo(const Point &aPoint)
if (CGPathIsEmpty(mCGPath))
MoveTo(aPoint);
else
CGPathAddLineToPoint(mCGPath, nullptr, aPoint.x, aPoint.y);
CGPathAddLineToPoint(mCGPath, NULL, aPoint.x, aPoint.y);
}
void
@ -39,7 +39,7 @@ PathBuilderCG::BezierTo(const Point &aCP1,
if (CGPathIsEmpty(mCGPath))
MoveTo(aCP1);
CGPathAddCurveToPoint(mCGPath, nullptr,
CGPathAddCurveToPoint(mCGPath, NULL,
aCP1.x, aCP1.y,
aCP2.x, aCP2.y,
aCP3.x, aCP3.y);
@ -52,7 +52,7 @@ PathBuilderCG::QuadraticBezierTo(const Point &aCP1,
{
if (CGPathIsEmpty(mCGPath))
MoveTo(aCP1);
CGPathAddQuadCurveToPoint(mCGPath, nullptr,
CGPathAddQuadCurveToPoint(mCGPath, NULL,
aCP1.x, aCP1.y,
aCP2.x, aCP2.y);
}
@ -171,7 +171,7 @@ PathCG::ContainsPoint(const Point &aPoint, const Matrix &aTransform) const
// The transform parameter of CGPathContainsPoint doesn't seem to work properly on OS X 10.5
// so we transform aPoint ourselves.
return CGPathContainsPoint(mPath, nullptr, point, mFillRule == FILL_EVEN_ODD);
return CGPathContainsPoint(mPath, NULL, point, mFillRule == FILL_EVEN_ODD);
}
static size_t
@ -184,9 +184,9 @@ PutBytesNull(void *info, const void *buffer, size_t count)
static CGContextRef
CreateScratchContext()
{
CGDataConsumerCallbacks callbacks = {PutBytesNull, nullptr};
CGDataConsumerRef consumer = CGDataConsumerCreate(nullptr, &callbacks);
CGContextRef cg = CGPDFContextCreate(consumer, nullptr, nullptr);
CGDataConsumerCallbacks callbacks = {PutBytesNull, NULL};
CGDataConsumerRef consumer = CGDataConsumerCreate(NULL, &callbacks);
CGContextRef cg = CGPDFContextCreate(consumer, NULL, NULL);
CGDataConsumerRelease(consumer);
return cg;
}

View File

@ -39,7 +39,7 @@ CairoPathContext::CairoPathContext(cairo_t* aCtx, DrawTargetCairo* aDrawTarget,
CairoPathContext::~CairoPathContext()
{
if (mDrawTarget) {
mDrawTarget->SetPathObserver(nullptr);
mDrawTarget->SetPathObserver(NULL);
}
cairo_destroy(mContext);
}
@ -52,7 +52,7 @@ CairoPathContext::ObserveTarget(DrawTargetCairo* aDrawTarget)
}
if (mDrawTarget) {
mDrawTarget->SetPathObserver(nullptr);
mDrawTarget->SetPathObserver(NULL);
}
mDrawTarget = aDrawTarget;
@ -159,7 +159,7 @@ CairoPathContext::CopyPathTo(cairo_t* aToContext)
void
CairoPathContext::ForgetDrawTarget()
{
mDrawTarget = nullptr;
mDrawTarget = NULL;
}
bool

View File

@ -236,7 +236,7 @@ PathBuilderD2D::Finish()
HRESULT hr = mSink->Close();
if (FAILED(hr)) {
gfxDebug() << "Failed to close PathSink. Code: " << hr;
return nullptr;
return NULL;
}
return new PathD2D(mGeometry, mFigureActive, mCurrentPoint, mFillRule);
@ -256,14 +256,14 @@ PathD2D::TransformedCopyToBuilder(const Matrix &aTransform, FillRule aFillRule)
if (FAILED(hr)) {
gfxWarning() << "Failed to create PathGeometry. Code: " << hr;
return nullptr;
return NULL;
}
RefPtr<ID2D1GeometrySink> sink;
hr = path->Open(byRef(sink));
if (FAILED(hr)) {
gfxWarning() << "Failed to open Geometry for writing. Code: " << hr;
return nullptr;
return NULL;
}
if (aFillRule == FILL_WINDING) {

View File

@ -137,7 +137,7 @@ CGLTexImageIOSurface2DFunc MacIOSurfaceLib::sTexImage;
IOSurfaceContextCreateFunc MacIOSurfaceLib::sIOSurfaceContextCreate;
IOSurfaceContextCreateImageFunc MacIOSurfaceLib::sIOSurfaceContextCreateImage;
IOSurfaceContextGetSurfaceFunc MacIOSurfaceLib::sIOSurfaceContextGetSurface;
unsigned int (*MacIOSurfaceLib::sCGContextGetTypePtr) (CGContextRef) = nullptr;
unsigned int (*MacIOSurfaceLib::sCGContextGetTypePtr) (CGContextRef) = NULL;
CFStringRef MacIOSurfaceLib::kPropWidth;
CFStringRef MacIOSurfaceLib::kPropHeight;
@ -208,19 +208,19 @@ CGContextRef MacIOSurfaceLib::IOSurfaceContextCreate(IOSurfacePtr aIOSurfacePtr,
unsigned aBitsPerComponent, unsigned aBytes,
CGColorSpaceRef aColorSpace, CGBitmapInfo bitmapInfo) {
if (!sIOSurfaceContextCreate)
return nullptr;
return NULL;
return sIOSurfaceContextCreate(aIOSurfacePtr, aWidth, aHeight, aBitsPerComponent, aBytes, aColorSpace, bitmapInfo);
}
CGImageRef MacIOSurfaceLib::IOSurfaceContextCreateImage(CGContextRef aContext) {
if (!sIOSurfaceContextCreateImage)
return nullptr;
return NULL;
return sIOSurfaceContextCreateImage(aContext);
}
IOSurfacePtr MacIOSurfaceLib::IOSurfaceContextGetSurface(CGContextRef aContext) {
if (!sIOSurfaceContextGetSurface)
return nullptr;
return NULL;
return sIOSurfaceContextGetSurface(aContext);
}
@ -314,9 +314,9 @@ TemporaryRef<MacIOSurface> MacIOSurface::CreateIOSurface(int aWidth, int aHeight
return nullptr;
int32_t bytesPerElem = 4;
CFNumberRef cfWidth = ::CFNumberCreate(nullptr, kCFNumberSInt32Type, &aWidth);
CFNumberRef cfHeight = ::CFNumberCreate(nullptr, kCFNumberSInt32Type, &aHeight);
CFNumberRef cfBytesPerElem = ::CFNumberCreate(nullptr, kCFNumberSInt32Type, &bytesPerElem);
CFNumberRef cfWidth = ::CFNumberCreate(NULL, kCFNumberSInt32Type, &aWidth);
CFNumberRef cfHeight = ::CFNumberCreate(NULL, kCFNumberSInt32Type, &aHeight);
CFNumberRef cfBytesPerElem = ::CFNumberCreate(NULL, kCFNumberSInt32Type, &bytesPerElem);
::CFDictionaryAddValue(props, MacIOSurfaceLib::kPropWidth,
cfWidth);
::CFRelease(cfWidth);
@ -382,11 +382,11 @@ size_t MacIOSurface::GetBytesPerRow() {
#define READ_ONLY 0x1
void MacIOSurface::Lock() {
MacIOSurfaceLib::IOSurfaceLock(mIOSurfacePtr, READ_ONLY, nullptr);
MacIOSurfaceLib::IOSurfaceLock(mIOSurfacePtr, READ_ONLY, NULL);
}
void MacIOSurface::Unlock() {
MacIOSurfaceLib::IOSurfaceUnlock(mIOSurfacePtr, READ_ONLY, nullptr);
MacIOSurfaceLib::IOSurfaceUnlock(mIOSurfacePtr, READ_ONLY, NULL);
}
#include "SourceSurfaceRawData.h"
@ -590,7 +590,7 @@ nsresult nsCARenderer::SetupRenderer(void *aCALayer, int aWidth, int aHeight,
mCGImage = ::CGImageCreate(aWidth, aHeight, 8, 32, aWidth * 4, colorSpace,
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
dataProvider, nullptr, true, kCGRenderingIntentDefault);
dataProvider, NULL, true, kCGRenderingIntentDefault);
::CGDataProviderRelease(dataProvider);
if (colorSpace) {
@ -763,8 +763,8 @@ nsresult nsCARenderer::Render(int aWidth, int aHeight,
NS_ERROR("No target destination for rendering");
} else if (aOutCGImage) {
// We are expected to return a CGImageRef, we will set
// it to nullptr in case we fail before the image is ready.
*aOutCGImage = nullptr;
// it to NULL in case we fail before the image is ready.
*aOutCGImage = NULL;
}
if (aWidth == 0 || aHeight == 0)
@ -813,7 +813,7 @@ nsresult nsCARenderer::Render(int aWidth, int aHeight,
[CATransaction commit];
double caTime = ::CACurrentMediaTime();
[caRenderer beginFrameAtTime:caTime timeStamp:nullptr];
[caRenderer beginFrameAtTime:caTime timeStamp:NULL];
[caRenderer addUpdateRect:CGRectMake(0,0, aWidth, aHeight)];
[caRenderer render];
[caRenderer endFrame];
@ -867,7 +867,7 @@ nsresult nsCARenderer::DrawSurfaceToCGContext(CGContextRef aContext,
void* ioData = surf->GetBaseAddress();
CGDataProviderRef dataProvider = ::CGDataProviderCreateWithData(ioData,
ioData, ioHeight*(bytesPerRow)*4,
nullptr); //No release callback
NULL); //No release callback
if (!dataProvider) {
surf->Unlock();
return NS_ERROR_FAILURE;
@ -875,7 +875,7 @@ nsresult nsCARenderer::DrawSurfaceToCGContext(CGContextRef aContext,
CGImageRef cgImage = ::CGImageCreate(ioWidth, ioHeight, 8, 32, bytesPerRow,
aColorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
dataProvider, nullptr, true, kCGRenderingIntentDefault);
dataProvider, NULL, true, kCGRenderingIntentDefault);
::CGDataProviderRelease(dataProvider);
if (!cgImage) {
surf->Unlock();
@ -925,7 +925,7 @@ void nsCARenderer::SaveToDisk(MacIOSurface *surf) {
void* ioData = surf->GetBaseAddress();
CGDataProviderRef dataProvider = ::CGDataProviderCreateWithData(ioData,
ioData, ioHeight*(bytesPerRow)*4,
nullptr); //No release callback
NULL); //No release callback
if (!dataProvider) {
surf->Unlock();
return;
@ -934,7 +934,7 @@ void nsCARenderer::SaveToDisk(MacIOSurface *surf) {
CGColorSpaceRef colorSpace = CreateSystemColorSpace();
CGImageRef cgImage = ::CGImageCreate(ioWidth, ioHeight, 8, 32, bytesPerRow,
colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
dataProvider, nullptr, true, kCGRenderingIntentDefault);
dataProvider, NULL, true, kCGRenderingIntentDefault);
::CGDataProviderRelease(dataProvider);
::CGColorSpaceRelease(colorSpace);
if (!cgImage) {
@ -949,16 +949,16 @@ void nsCARenderer::SaveToDisk(MacIOSurface *surf) {
CFStringRef cfStr = ::CFStringCreateWithCString(kCFAllocatorDefault, cstr, kCFStringEncodingMacRoman);
printf("Exporting: %s\n", cstr);
CFURLRef url = ::CFURLCreateWithString( nullptr, cfStr, nullptr);
CFURLRef url = ::CFURLCreateWithString( NULL, cfStr, NULL);
::CFRelease(cfStr);
CFStringRef type = kUTTypePNG;
size_t count = 1;
CFDictionaryRef options = nullptr;
CFDictionaryRef options = NULL;
CGImageDestinationRef dest = ::CGImageDestinationCreateWithURL(url, type, count, options);
::CFRelease(url);
::CGImageDestinationAddImage(dest, cgImage, nullptr);
::CGImageDestinationAddImage(dest, cgImage, NULL);
::CGImageDestinationFinalize(dest);
::CFRelease(dest);

View File

@ -37,10 +37,10 @@ ScaledFontBase::ScaledFontBase(Float aSize)
: mSize(aSize)
{
#ifdef USE_SKIA
mTypeface = nullptr;
mTypeface = NULL;
#endif
#ifdef USE_CAIRO
mScaledFont = nullptr;
mScaledFont = NULL;
#endif
}
@ -95,7 +95,7 @@ ScaledFontBase::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *a
return builder->Finish();
}
#endif
return nullptr;
return NULL;
}
void

View File

@ -18,7 +18,7 @@ ScaledFontDWrite::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget
if (aTarget->GetType() != BACKEND_DIRECT2D) {
// For now we only support Direct2D.
gfxWarning() << "Attempt to use Direct Write font with non-Direct2D backend";
return nullptr;
return NULL;
}
RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder();

View File

@ -38,7 +38,7 @@ ScaledFontMac::~ScaledFontMac()
SkTypeface* ScaledFontMac::GetSkTypeface()
{
if (!mTypeface) {
CTFontRef fontFace = CTFontCreateWithGraphicsFont(mFont, mSize, nullptr, nullptr);
CTFontRef fontFace = CTFontCreateWithGraphicsFont(mFont, mSize, NULL, NULL);
mTypeface = SkCreateTypefaceFromCTFont(fontFace);
CFRelease(fontFace);
}

View File

@ -53,9 +53,9 @@ SourceSurfaceCG::InitFromData(unsigned char *aData,
SurfaceFormat aFormat)
{
//XXX: we should avoid creating this colorspace everytime
CGColorSpaceRef colorSpace = nullptr;
CGColorSpaceRef colorSpace = NULL;
CGBitmapInfo bitinfo = 0;
CGDataProviderRef dataProvider = nullptr;
CGDataProviderRef dataProvider = NULL;
int bitsPerComponent = 0;
int bitsPerPixel = 0;
@ -110,7 +110,7 @@ SourceSurfaceCG::InitFromData(unsigned char *aData,
colorSpace,
bitinfo,
dataProvider,
nullptr,
NULL,
true,
kCGRenderingIntentDefault);
}
@ -118,7 +118,7 @@ SourceSurfaceCG::InitFromData(unsigned char *aData,
CGDataProviderRelease(dataProvider);
CGColorSpaceRelease (colorSpace);
return mImage != nullptr;
return mImage != NULL;
}
DataSourceSurfaceCG::~DataSourceSurfaceCG()
@ -144,9 +144,9 @@ DataSourceSurfaceCG::InitFromData(unsigned char *aData,
SurfaceFormat aFormat)
{
//XXX: we should avoid creating this colorspace everytime
CGColorSpaceRef colorSpace = nullptr;
CGColorSpaceRef colorSpace = NULL;
CGBitmapInfo bitinfo = 0;
CGDataProviderRef dataProvider = nullptr;
CGDataProviderRef dataProvider = NULL;
int bitsPerComponent = 0;
int bitsPerPixel = 0;
@ -199,7 +199,7 @@ DataSourceSurfaceCG::InitFromData(unsigned char *aData,
colorSpace,
bitinfo,
dataProvider,
nullptr,
NULL,
true,
kCGRenderingIntentDefault);
}
@ -225,10 +225,10 @@ CGContextRef CreateBitmapContextForImage(CGImageRef image)
colorSpace = CGColorSpaceCreateDeviceRGB();
assert(colorSpace);
// we'd like to pass nullptr as the first parameter
// we'd like to pass NULL as the first parameter
// to let Quartz manage this memory for us. However,
// on 10.5 and older CGBitmapContextGetData will return
// nullptr instead of the associated buffer so we need
// NULL instead of the associated buffer so we need
// to manage it ourselves.
CGContextRef cg = CGBitmapContextCreate(data,
width,
@ -248,7 +248,7 @@ DataSourceSurfaceCG::DataSourceSurfaceCG(CGImageRef aImage)
{
mImage = aImage;
mCg = CreateBitmapContextForImage(aImage);
if (mCg == nullptr) {
if (mCg == NULL) {
// error creating context
return;
}
@ -295,7 +295,7 @@ SourceSurfaceCGBitmapContext::SourceSurfaceCGBitmapContext(DrawTargetCG *aDrawTa
mStride = CGBitmapContextGetBytesPerRow(mCg);
mData = CGBitmapContextGetData(mCg);
mImage = nullptr;
mImage = NULL;
}
void SourceSurfaceCGBitmapContext::EnsureImage() const
@ -309,9 +309,9 @@ void SourceSurfaceCGBitmapContext::EnsureImage() const
// performance characteristics.
if (!mImage) {
//XXX: we should avoid creating this colorspace everytime
CGColorSpaceRef colorSpace = nullptr;
CGColorSpaceRef colorSpace = NULL;
CGBitmapInfo bitinfo = 0;
CGDataProviderRef dataProvider = nullptr;
CGDataProviderRef dataProvider = NULL;
int bitsPerComponent = 8;
int bitsPerPixel = 32;
@ -323,7 +323,7 @@ void SourceSurfaceCGBitmapContext::EnsureImage() const
// if we have an mCg than it owns the data
// and we don't want to tranfer ownership
// to the CGDataProviderCreateWithData
info = nullptr;
info = NULL;
} else {
// otherwise we transfer ownership to
// the dataProvider
@ -344,7 +344,7 @@ void SourceSurfaceCGBitmapContext::EnsureImage() const
colorSpace,
bitinfo,
dataProvider,
nullptr,
NULL,
true,
kCGRenderingIntentDefault);
@ -378,10 +378,10 @@ SourceSurfaceCGBitmapContext::DrawTargetWillChange()
// drop the current image for the data associated with the CGBitmapContext
if (mImage)
CGImageRelease(mImage);
mImage = nullptr;
mImage = NULL;
mCg = nullptr;
mDrawTarget = nullptr;
mCg = NULL;
mDrawTarget = NULL;
}
}
@ -406,7 +406,7 @@ SourceSurfaceCGIOSurfaceContext::SourceSurfaceCGIOSurfaceContext(DrawTargetCG *a
// TODO use CreateImageFromIOSurfaceContext instead of reading back the surface
//mImage = MacIOSurface::CreateImageFromIOSurfaceContext(cg);
mImage = nullptr;
mImage = NULL;
aDrawTarget->Flush();
surf->Lock();
@ -434,9 +434,9 @@ void SourceSurfaceCGIOSurfaceContext::EnsureImage() const
// performance characteristics.
if (!mImage) {
//XXX: we should avoid creating this colorspace everytime
CGColorSpaceRef colorSpace = nullptr;
CGColorSpaceRef colorSpace = NULL;
CGBitmapInfo bitinfo = 0;
CGDataProviderRef dataProvider = nullptr;
CGDataProviderRef dataProvider = NULL;
int bitsPerComponent = 8;
int bitsPerPixel = 32;
@ -457,7 +457,7 @@ void SourceSurfaceCGIOSurfaceContext::EnsureImage() const
colorSpace,
bitinfo,
dataProvider,
nullptr,
NULL,
true,
kCGRenderingIntentDefault);

View File

@ -31,7 +31,7 @@ CairoFormatToSurfaceFormat(cairo_format_t format)
SourceSurfaceCairo::SourceSurfaceCairo(cairo_surface_t* aSurface,
const IntSize& aSize,
const SurfaceFormat& aFormat,
DrawTargetCairo* aDrawTarget /* = nullptr */)
DrawTargetCairo* aDrawTarget /* = NULL */)
: mSize(aSize)
, mFormat(aFormat)
, mSurface(aSurface)
@ -92,7 +92,7 @@ void
SourceSurfaceCairo::DrawTargetWillChange()
{
if (mDrawTarget) {
mDrawTarget = nullptr;
mDrawTarget = NULL;
// We're about to lose our version of the surface, so make a copy of it.
cairo_surface_t* surface = cairo_surface_create_similar(mSurface,
@ -116,7 +116,7 @@ SourceSurfaceCairo::MarkIndependent()
{
if (mDrawTarget) {
mDrawTarget->RemoveSnapshot(this);
mDrawTarget = nullptr;
mDrawTarget = NULL;
}
}

View File

@ -18,12 +18,12 @@ class SourceSurfaceCairo : public SourceSurface
public:
// Create a SourceSurfaceCairo. The surface will not be copied, but simply
// referenced.
// If aDrawTarget is non-nullptr, it is assumed that this is a snapshot source
// If aDrawTarget is non-NULL, it is assumed that this is a snapshot source
// surface, and we'll call DrawTargetCairo::RemoveSnapshot(this) on it when
// we're destroyed.
SourceSurfaceCairo(cairo_surface_t* aSurface, const IntSize& aSize,
const SurfaceFormat& aFormat,
DrawTargetCairo* aDrawTarget = nullptr);
DrawTargetCairo* aDrawTarget = NULL);
virtual ~SourceSurfaceCairo();
virtual SurfaceType GetType() const { return SURFACE_CAIRO; }

View File

@ -43,7 +43,7 @@ SourceSurfaceD2D::IsValid() const
TemporaryRef<DataSourceSurface>
SourceSurfaceD2D::GetDataSurface()
{
return nullptr;
return NULL;
}
bool

View File

@ -64,11 +64,11 @@ SourceSurfaceD2DTarget::GetDataSurface()
desc.BindFlags = 0;
desc.MiscFlags = 0;
HRESULT hr = Factory::GetDirect3D10Device()->CreateTexture2D(&desc, nullptr, byRef(dataSurf->mTexture));
HRESULT hr = Factory::GetDirect3D10Device()->CreateTexture2D(&desc, NULL, byRef(dataSurf->mTexture));
if (FAILED(hr)) {
gfxDebug() << "Failed to create staging texture for SourceSurface. Code: " << hr;
return nullptr;
return NULL;
}
Factory::GetDirect3D10Device()->CopyResource(dataSurf->mTexture, mTexture);
@ -82,7 +82,7 @@ SourceSurfaceD2DTarget::GetSRView()
return mSRView;
}
HRESULT hr = Factory::GetDirect3D10Device()->CreateShaderResourceView(mTexture, nullptr, byRef(mSRView));
HRESULT hr = Factory::GetDirect3D10Device()->CreateShaderResourceView(mTexture, NULL, byRef(mSRView));
if (FAILED(hr)) {
gfxWarning() << "Failed to create ShaderResourceView. Code: " << hr;
@ -100,10 +100,10 @@ SourceSurfaceD2DTarget::DrawTargetWillChange()
mTexture->GetDesc(&desc);
// Get a copy of the surface data so the content at snapshot time was saved.
Factory::GetDirect3D10Device()->CreateTexture2D(&desc, nullptr, byRef(mTexture));
Factory::GetDirect3D10Device()->CreateTexture2D(&desc, NULL, byRef(mTexture));
Factory::GetDirect3D10Device()->CopyResource(mTexture, oldTexture);
mBitmap = nullptr;
mBitmap = NULL;
DrawTargetD2D::mVRAMUsageSS += desc.Width * desc.Height * BytesPerPixel(mFormat);
mOwnsCopy = true;
@ -130,7 +130,7 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1RenderTarget *aRT)
if (FAILED(hr)) {
gfxWarning() << "Failed to query interface texture to DXGISurface. Code: " << hr;
return nullptr;
return NULL;
}
D2D1_BITMAP_PROPERTIES props =
@ -160,7 +160,7 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1RenderTarget *aRT)
if (FAILED(hr)) {
gfxWarning() << "Failed to QI texture to surface.";
return nullptr;
return NULL;
}
D2D1_RENDER_TARGET_PROPERTIES props =
@ -169,11 +169,11 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1RenderTarget *aRT)
if (FAILED(hr)) {
gfxWarning() << "Failed to create D2D render target for texture.";
return nullptr;
return NULL;
}
}
mBitmap->CopyFromRenderTarget(nullptr, rt, nullptr);
mBitmap->CopyFromRenderTarget(NULL, rt, NULL);
return mBitmap;
}
@ -185,8 +185,8 @@ SourceSurfaceD2DTarget::MarkIndependent()
{
if (mDrawTarget) {
MOZ_ASSERT(mDrawTarget->mSnapshot == this);
mDrawTarget->mSnapshot = nullptr;
mDrawTarget = nullptr;
mDrawTarget->mSnapshot = NULL;
mDrawTarget = NULL;
}
}

View File

@ -27,7 +27,7 @@ public:
virtual SurfaceFormat GetFormat() const { return mA->GetFormat(); }
/* Readback from this surface type is not supported! */
virtual TemporaryRef<DataSourceSurface> GetDataSurface() { return nullptr; }
virtual TemporaryRef<DataSourceSurface> GetDataSurface() { return NULL; }
private:
friend class DualSurface;
friend class DualPattern;

View File

@ -15,7 +15,7 @@ namespace mozilla {
namespace gfx {
SourceSurfaceSkia::SourceSurfaceSkia()
: mDrawTarget(nullptr)
: mDrawTarget(NULL)
{
}
@ -90,7 +90,7 @@ void
SourceSurfaceSkia::DrawTargetWillChange()
{
if (mDrawTarget) {
mDrawTarget = nullptr;
mDrawTarget = NULL;
SkBitmap temp = mBitmap;
mBitmap.reset();
temp.copyTo(&mBitmap, temp.getConfig());
@ -100,7 +100,7 @@ SourceSurfaceSkia::DrawTargetWillChange()
void
SourceSurfaceSkia::DrawTargetDestroyed()
{
mDrawTarget = nullptr;
mDrawTarget = NULL;
}
void
@ -108,7 +108,7 @@ SourceSurfaceSkia::MarkIndependent()
{
if (mDrawTarget) {
mDrawTarget->RemoveSnapshot(this);
mDrawTarget = nullptr;
mDrawTarget = NULL;
}
}

View File

@ -34,7 +34,7 @@ public:
SurfaceFormat aFormat);
/**
* If aOwner is nullptr, we make a copy of the pixel data in the bitmap,
* If aOwner is NULL, we make a copy of the pixel data in the bitmap,
* otherwise we just reference this data until DrawTargetWillChange is called.
*/
bool InitWithBitmap(const SkBitmap& aBitmap,

View File

@ -21,7 +21,7 @@ class UserData
{
typedef void (*destroyFunc)(void *data);
public:
UserData() : count(0), entries(nullptr) {}
UserData() : count(0), entries(NULL) {}
/* Attaches untyped userData associated with key. destroy is called on destruction */
void Add(UserDataKey *key, void *userData, destroyFunc destroy)
@ -68,7 +68,7 @@ public:
return userData;
}
}
return nullptr;
return NULL;
}
/* Retrives the userData for the associated key */
@ -79,7 +79,7 @@ public:
return entries[i].userData;
}
}
return nullptr;
return NULL;
}
bool Has(UserDataKey *key)
@ -100,7 +100,7 @@ public:
}
}
free(entries);
entries = nullptr;
entries = NULL;
count = 0;
}

View File

@ -8,9 +8,9 @@
using namespace mozilla::gfx;
TestDrawTargetD2D::TestDrawTargetD2D()
{
::D3D10CreateDevice1(nullptr,
::D3D10CreateDevice1(NULL,
D3D10_DRIVER_TYPE_HARDWARE,
nullptr,
NULL,
D3D10_CREATE_DEVICE_BGRA_SUPPORT |
D3D10_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS,
D3D10_FEATURE_LEVEL_10_0,

View File

@ -16,4 +16,4 @@ public:
private:
mozilla::RefPtr<ID3D10Device1> mDevice;
};
};