Bug 1198574 - Remove unnecessary argument for PersistentBufferProvider. r=bas

This commit is contained in:
Vincent Liu 2015-08-26 18:58:18 +08:00
Родитель 6efd887296
Коммит 62a02d2e47
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

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