зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1653193 - Remove public includes for CanvasRenderingContext2D.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83752
This commit is contained in:
Родитель
75e36d4ce3
Коммит
754c06d4eb
|
@ -0,0 +1,14 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "CanvasGradient.h"
|
||||
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
|
||||
namespace mozilla::dom {
|
||||
CanvasGradient::CanvasGradient(CanvasRenderingContext2D* aContext, Type aType)
|
||||
: mContext(aContext), mType(aType) {}
|
||||
|
||||
CanvasGradient::~CanvasGradient() = default;
|
||||
} // namespace mozilla::dom
|
|
@ -5,11 +5,9 @@
|
|||
#ifndef mozilla_dom_CanvasGradient_h
|
||||
#define mozilla_dom_CanvasGradient_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2DBinding.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "gfxGradientCache.h"
|
||||
|
@ -17,6 +15,8 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class CanvasRenderingContext2D;
|
||||
|
||||
class CanvasGradient : public nsWrapperCache {
|
||||
public:
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(CanvasGradient)
|
||||
|
@ -51,14 +51,14 @@ class CanvasGradient : public nsWrapperCache {
|
|||
protected:
|
||||
friend struct CanvasBidiProcessor;
|
||||
|
||||
CanvasGradient(CanvasRenderingContext2D* aContext, Type aType)
|
||||
: mContext(aContext), mType(aType) {}
|
||||
CanvasGradient(CanvasRenderingContext2D* aContext, Type aType);
|
||||
|
||||
virtual ~CanvasGradient();
|
||||
|
||||
RefPtr<CanvasRenderingContext2D> mContext;
|
||||
nsTArray<mozilla::gfx::GradientStop> mRawStops;
|
||||
RefPtr<mozilla::gfx::GradientStops> mStops;
|
||||
Type mType;
|
||||
virtual ~CanvasGradient() = default;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "CanvasPattern.h"
|
||||
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
|
||||
namespace mozilla::dom {
|
||||
CanvasPattern::CanvasPattern(CanvasRenderingContext2D* aContext,
|
||||
gfx::SourceSurface* aSurface, RepeatMode aRepeat,
|
||||
nsIPrincipal* principalForSecurityCheck,
|
||||
bool forceWriteOnly, bool CORSUsed)
|
||||
: mContext(aContext),
|
||||
mSurface(aSurface),
|
||||
mPrincipal(principalForSecurityCheck),
|
||||
mTransform(),
|
||||
mForceWriteOnly(forceWriteOnly),
|
||||
mCORSUsed(CORSUsed),
|
||||
mRepeat(aRepeat) {}
|
||||
|
||||
CanvasPattern::~CanvasPattern() = default;
|
||||
} // namespace mozilla::dom
|
|
@ -5,9 +5,7 @@
|
|||
#ifndef mozilla_dom_CanvasPattern_h
|
||||
#define mozilla_dom_CanvasPattern_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2DBinding.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2D.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
@ -20,10 +18,11 @@ class SourceSurface;
|
|||
} // namespace gfx
|
||||
|
||||
namespace dom {
|
||||
class CanvasRenderingContext2D;
|
||||
struct DOMMatrix2DInit;
|
||||
|
||||
class CanvasPattern final : public nsWrapperCache {
|
||||
~CanvasPattern() = default;
|
||||
~CanvasPattern();
|
||||
|
||||
public:
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(CanvasPattern)
|
||||
|
@ -34,14 +33,7 @@ class CanvasPattern final : public nsWrapperCache {
|
|||
CanvasPattern(CanvasRenderingContext2D* aContext,
|
||||
gfx::SourceSurface* aSurface, RepeatMode aRepeat,
|
||||
nsIPrincipal* principalForSecurityCheck, bool forceWriteOnly,
|
||||
bool CORSUsed)
|
||||
: mContext(aContext),
|
||||
mSurface(aSurface),
|
||||
mPrincipal(principalForSecurityCheck),
|
||||
mTransform(),
|
||||
mForceWriteOnly(forceWriteOnly),
|
||||
mCORSUsed(CORSUsed),
|
||||
mRepeat(aRepeat) {}
|
||||
bool CORSUsed);
|
||||
|
||||
JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
|
||||
#include "mozilla/IntegerRange.h"
|
||||
#include "WebGL2Context.h"
|
||||
#include "WebGLBuffer.h"
|
||||
#include "WebGLProgram.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef WEBGL_TRANSFORM_FEEDBACK_H_
|
||||
#define WEBGL_TRANSFORM_FEEDBACK_H_
|
||||
|
||||
#include "WebGLContext.h"
|
||||
#include "WebGLObjectModel.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -76,7 +76,9 @@ EXPORTS.mozilla.dom += [
|
|||
|
||||
# Canvas 2D and common sources
|
||||
UNIFIED_SOURCES += [
|
||||
'CanvasGradient.cpp',
|
||||
'CanvasImageCache.cpp',
|
||||
'CanvasPattern.cpp',
|
||||
'CanvasRenderingContext2D.cpp',
|
||||
'CanvasRenderingContextHelper.cpp',
|
||||
'CanvasUtils.cpp',
|
||||
|
|
Загрузка…
Ссылка в новой задаче