зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779001. Falling back to Cairo for large canvases. r=roc
This commit is contained in:
Родитель
2aa55f627a
Коммит
c45bb4fff0
|
@ -690,7 +690,7 @@ gfxPlatform::CreateDrawTargetForBackend(BackendType aBackend, const IntSize& aSi
|
|||
if (aBackend == BACKEND_CAIRO) {
|
||||
nsRefPtr<gfxASurface> surf = CreateOffscreenSurface(ThebesIntSize(aSize),
|
||||
ContentForFormat(aFormat));
|
||||
if (!surf) {
|
||||
if (!surf || surf->CairoStatus()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -733,7 +733,7 @@ already_AddRefed<gfxASurface>
|
|||
gfxWindowsPlatform::CreateOffscreenSurface(const gfxIntSize& size,
|
||||
gfxASurface::gfxContentType contentType)
|
||||
{
|
||||
gfxASurface *surf = nullptr;
|
||||
nsRefPtr<gfxASurface> surf = nullptr;
|
||||
|
||||
#ifdef CAIRO_HAS_WIN32_SURFACE
|
||||
if (mRenderMode == RENDER_GDI)
|
||||
|
@ -745,12 +745,11 @@ gfxWindowsPlatform::CreateOffscreenSurface(const gfxIntSize& size,
|
|||
surf = new gfxD2DSurface(size, OptimalFormatForContent(contentType));
|
||||
#endif
|
||||
|
||||
if (surf == nullptr)
|
||||
if (!surf || surf->CairoStatus()) {
|
||||
surf = new gfxImageSurface(size, OptimalFormatForContent(contentType));
|
||||
}
|
||||
|
||||
NS_IF_ADDREF(surf);
|
||||
|
||||
return surf;
|
||||
return surf.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
|
|
Загрузка…
Ссылка в новой задаче