mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Issue #2364 - use DrawTarget::DrawSurfaceWithShadow to render box shadows on platforms that accelerate it.
This commit is contained in:
parent
8d30faf95f
commit
4beb3b947c
13 changed files with 228 additions and 150 deletions
|
|
@ -1309,7 +1309,12 @@ gfxPlatform::CreateSimilarSoftwareDrawTarget(DrawTarget* aDT,
|
|||
if (Factory::DoesBackendSupportDataDrawtarget(aDT->GetBackendType())) {
|
||||
dt = aDT->CreateSimilarDrawTarget(aSize, aFormat);
|
||||
} else {
|
||||
dt = Factory::CreateDrawTarget(BackendType::SKIA, aSize, aFormat);
|
||||
#ifdef USE_SKIA
|
||||
BackendType backendType = BackendType::SKIA;
|
||||
#else
|
||||
BackendType backendType = BackendType::CAIRO;
|
||||
#endif
|
||||
dt = Factory::CreateDrawTarget(backendType, aSize, aFormat);
|
||||
}
|
||||
|
||||
return dt.forget();
|
||||
|
|
@ -1322,7 +1327,11 @@ gfxPlatform::CreateDrawTargetForData(unsigned char* aData, const IntSize& aSize,
|
|||
NS_ASSERTION(backendType != BackendType::NONE, "No backend.");
|
||||
|
||||
if (!Factory::DoesBackendSupportDataDrawtarget(backendType)) {
|
||||
#ifdef USE_SKIA
|
||||
backendType = BackendType::SKIA;
|
||||
#else
|
||||
backendType = BackendType::CAIRO;
|
||||
#endif
|
||||
}
|
||||
|
||||
RefPtr<DrawTarget> dt = Factory::CreateDrawTargetForData(backendType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue