Bug 725119 - allow Skia as a content backend in gfxPlatform. r=mchang

MozReview-Commit-ID: GjIybnjz4wl
This commit is contained in:
Lee Salzman 2016-08-31 15:53:08 -04:00
parent 3fb6c49dbe
commit af21c66e1e
2 changed files with 4 additions and 8 deletions

View File

@ -499,10 +499,11 @@ gfxPlatform::gfxPlatform()
mSkiaGlue = nullptr;
uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO);
uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
#ifdef USE_SKIA
canvasMask |= BackendTypeBit(BackendType::SKIA);
contentMask |= BackendTypeBit(BackendType::SKIA);
#endif
uint32_t contentMask = BackendTypeBit(BackendType::CAIRO);
InitBackendPrefs(canvasMask, BackendType::CAIRO,
contentMask, BackendType::CAIRO);
mTotalSystemMemory = mozilla::hal::GetTotalSystemMemory();

View File

@ -136,10 +136,6 @@ class ThumbnailHelper final
return nullptr;
}
MOZ_ASSERT(gfxPlatform::GetPlatform()->
SupportsAzureContentForType(BackendType::CAIRO),
"Need BackendType::CAIRO support");
uint8_t* const data = static_cast<uint8_t*>(aData->Address());
if (!data) {
return nullptr;
@ -149,12 +145,11 @@ class ThumbnailHelper final
AndroidBridge::Bridge()->GetScreenDepth() == 24;
const uint32_t stride = aThumbWidth * (is24bit ? 4 : 2);
RefPtr<DrawTarget> dt = gfx::Factory::CreateDrawTargetForData(
BackendType::CAIRO,
RefPtr<DrawTarget> dt = gfxPlatform::GetPlatform()->CreateDrawTargetForData(
data,
IntSize(aThumbWidth, aThumbHeight),
stride,
is24bit ? SurfaceFormat::B8G8R8X8
is24bit ? SurfaceFormat::B8G8R8A8
: SurfaceFormat::R5G6B5_UINT16);
if (!dt || !dt->IsValid()) {