зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1198574 - Remove unnecessary argument for PersistentBufferProvider. r=bas
This commit is contained in:
Родитель
6efd887296
Коммит
62a02d2e47
|
@ -165,12 +165,12 @@ LayerManager::CreatePersistentBufferProvider(const mozilla::gfx::IntSize &aSize,
|
||||||
mozilla::gfx::SurfaceFormat aFormat)
|
mozilla::gfx::SurfaceFormat aFormat)
|
||||||
{
|
{
|
||||||
RefPtr<PersistentBufferProviderBasic> bufferProvider =
|
RefPtr<PersistentBufferProviderBasic> bufferProvider =
|
||||||
new PersistentBufferProviderBasic(this, aSize, aFormat,
|
new PersistentBufferProviderBasic(aSize, aFormat,
|
||||||
gfxPlatform::GetPlatform()->GetPreferredCanvasBackend());
|
gfxPlatform::GetPlatform()->GetPreferredCanvasBackend());
|
||||||
|
|
||||||
if (!bufferProvider->IsValid()) {
|
if (!bufferProvider->IsValid()) {
|
||||||
bufferProvider =
|
bufferProvider =
|
||||||
new PersistentBufferProviderBasic(this, aSize, aFormat,
|
new PersistentBufferProviderBasic(aSize, aFormat,
|
||||||
gfxPlatform::GetPlatform()->GetFallbackCanvasBackend());
|
gfxPlatform::GetPlatform()->GetFallbackCanvasBackend());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ using namespace gfx;
|
||||||
|
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
PersistentBufferProviderBasic::PersistentBufferProviderBasic(LayerManager* aManager, gfx::IntSize aSize,
|
PersistentBufferProviderBasic::PersistentBufferProviderBasic(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||||
gfx::SurfaceFormat aFormat, gfx::BackendType aBackend)
|
gfx::BackendType aBackend)
|
||||||
{
|
{
|
||||||
mDrawTarget = gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(aBackend, aSize, aFormat);
|
mDrawTarget = gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(aBackend, aSize, aFormat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,8 +57,8 @@ class PersistentBufferProviderBasic : public PersistentBufferProvider
|
||||||
public:
|
public:
|
||||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PersistentBufferProviderBasic)
|
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PersistentBufferProviderBasic)
|
||||||
|
|
||||||
PersistentBufferProviderBasic(LayerManager* aManager, gfx::IntSize aSize,
|
PersistentBufferProviderBasic(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||||
gfx::SurfaceFormat aFormat, gfx::BackendType aBackend);
|
gfx::BackendType aBackend);
|
||||||
explicit PersistentBufferProviderBasic(gfx::DrawTarget* aTarget) : mDrawTarget(aTarget) {}
|
explicit PersistentBufferProviderBasic(gfx::DrawTarget* aTarget) : mDrawTarget(aTarget) {}
|
||||||
|
|
||||||
bool IsValid() { return !!mDrawTarget; }
|
bool IsValid() { return !!mDrawTarget; }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче