Add a way to extract TextureSources from a BigImageIterator. (bug 1365879 part 9, r=mattwoodrow)
This commit is contained in:
@@ -172,6 +172,13 @@ public:
|
||||
MOZ_ASSERT(mCompositableCount >= 0);
|
||||
}
|
||||
|
||||
// When iterating as a BigImage, this creates temporary TextureSources wrapping
|
||||
// individual tiles.
|
||||
virtual RefPtr<TextureSource> ExtractCurrentTile() {
|
||||
NS_WARNING("Implementation does not expose tile sources");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int NumCompositableRefs() const { return mCompositableCount; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1215,6 +1215,13 @@ DataTextureSourceD3D11::GetD3D11Texture() const
|
||||
: mTexture;
|
||||
}
|
||||
|
||||
RefPtr<TextureSource>
|
||||
DataTextureSourceD3D11::ExtractCurrentTile()
|
||||
{
|
||||
MOZ_ASSERT(mIterating);
|
||||
return new DataTextureSourceD3D11(mDevice, mFormat, mTileTextures[mCurrentTile]);
|
||||
}
|
||||
|
||||
ID3D11ShaderResourceView*
|
||||
DataTextureSourceD3D11::GetShaderResourceView()
|
||||
{
|
||||
|
||||
@@ -264,6 +264,8 @@ public:
|
||||
mCurrentTile = 0;
|
||||
}
|
||||
|
||||
RefPtr<TextureSource> ExtractCurrentTile() override;
|
||||
|
||||
void Reset();
|
||||
protected:
|
||||
gfx::IntRect GetTileRect(uint32_t aIndex) const;
|
||||
|
||||
Reference in New Issue
Block a user