mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 725119 - allow Skia as a content backend in gfxPlatform. r=mchang
MozReview-Commit-ID: GjIybnjz4wl
This commit is contained in:
parent
3fb6c49dbe
commit
af21c66e1e
@ -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();
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user