Bug 989858 - Part 1: Add Moz2D helpers to BasicLayersImpl. r=roc

This commit is contained in:
Matt Woodrow
2014-04-01 12:02:09 +08:00
parent 3c83ef23a9
commit efd983930f
5 changed files with 144 additions and 4 deletions

View File

@@ -56,6 +56,7 @@ public:
virtual bool GetAsSurface(gfxASurface** aSurface,
SurfaceDescriptor* aDescriptor);
virtual TemporaryRef<SourceSurface> GetAsSourceSurface() MOZ_OVERRIDE;
protected:
BasicLayerManager* BasicManager()
@@ -231,6 +232,17 @@ BasicImageLayer::GetAsSurface(gfxASurface** aSurface,
return true;
}
TemporaryRef<SourceSurface>
BasicImageLayer::GetAsSourceSurface()
{
if (!mContainer) {
return nullptr;
}
gfx::IntSize dontCare;
return mContainer->GetCurrentAsSourceSurface(&dontCare);
}
already_AddRefed<ImageLayer>
BasicLayerManager::CreateImageLayer()
{