Bug 620665 - Part 1: Expose backend type on ImageContainers. r=roc a=blocking-beta9

This commit is contained in:
Bas Schouten
2010-12-29 01:07:00 +00:00
parent df57dabe98
commit e0ef6b04dc
5 changed files with 14 additions and 0 deletions

View File

@@ -195,6 +195,13 @@ public:
*/
virtual void SetScaleHint(const gfxIntSize& /* aScaleHint */) { }
/**
* Get the layer manager type this image container was created with,
* presumably its users might want to do something special if types do not
* match.
*/
virtual LayerManager::LayersBackend GetBackendType() = 0;
protected:
LayerManager* mManager;

View File

@@ -305,6 +305,7 @@ public:
virtual PRBool SetLayerManager(LayerManager *aManager);
virtual void SetScaleHint(const gfxIntSize& aScaleHint);
void SetOffscreenFormat(gfxImageFormat aFormat) { mOffscreenFormat = aFormat; }
virtual LayerManager::LayersBackend GetBackendType() { return LayerManager::LAYERS_BASIC; }
protected:
Monitor mMonitor;

View File

@@ -65,6 +65,8 @@ public:
virtual PRBool SetLayerManager(LayerManager *aManager);
virtual LayerManager::LayersBackend GetBackendType() { return LayerManager::LAYERS_D3D10; }
private:
typedef mozilla::Mutex Mutex;

View File

@@ -65,6 +65,8 @@ public:
virtual PRBool SetLayerManager(LayerManager *aManager);
virtual LayerManager::LayersBackend GetBackendType() { return LayerManager::LAYERS_D3D9; }
private:
typedef mozilla::Mutex Mutex;

View File

@@ -156,6 +156,8 @@ public:
virtual PRBool SetLayerManager(LayerManager *aManager);
virtual LayerManager::LayersBackend GetBackendType() { return LayerManager::LAYERS_OPENGL; }
private:
typedef mozilla::Mutex Mutex;