зеркало из https://github.com/mozilla/gecko-dev.git
b=568526 (related); add env var for switching 2d canvas to image surfaces; r=bz
This commit is contained in:
Родитель
34ebfb3b84
Коммит
8d6816b2c9
|
@ -46,6 +46,7 @@
|
|||
#endif
|
||||
|
||||
#include "prmem.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
|
||||
|
@ -950,8 +951,12 @@ nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
|||
if (mOpaque)
|
||||
format = gfxASurface::ImageFormatRGB24;
|
||||
|
||||
surface = gfxPlatform::GetPlatform()->CreateOffscreenSurface
|
||||
(gfxIntSize(width, height), format);
|
||||
if (PR_GetEnv("MOZ_CANVAS_IMAGE_SURFACE")) {
|
||||
surface = new gfxImageSurface(gfxIntSize(width, height), format);
|
||||
} else {
|
||||
surface = gfxPlatform::GetPlatform()->CreateOffscreenSurface
|
||||
(gfxIntSize(width, height), format);
|
||||
}
|
||||
|
||||
if (surface->CairoStatus() != 0) {
|
||||
surface = NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче