зеркало из https://github.com/mozilla/gecko-dev.git
Bug 807408 - Cache the temporary surface used when drawing ThebesLayers with BasicLayers. r=jrmuizel
This commit is contained in:
Родитель
75305bbfd0
Коммит
f0004b2afd
|
@ -537,9 +537,13 @@ BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
|||
mTransactionIncomplete = false;
|
||||
|
||||
if (aFlags & END_NO_COMPOSITE) {
|
||||
// TODO: We should really just set mTarget to null and make sure we can handle that further down the call chain
|
||||
nsRefPtr<gfxASurface> surf = gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(1, 1), gfxASurface::CONTENT_COLOR);
|
||||
mTarget = new gfxContext(surf);
|
||||
if (!mDummyTarget) {
|
||||
// TODO: We should really just set mTarget to null and make sure we can handle that further down the call chain
|
||||
// Creating this temporary surface can be expensive on some platforms (d2d in particular), so cache it between paints.
|
||||
nsRefPtr<gfxASurface> surf = gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(1, 1), gfxASurface::CONTENT_COLOR);
|
||||
mDummyTarget = new gfxContext(surf);
|
||||
}
|
||||
mTarget = mDummyTarget;
|
||||
}
|
||||
|
||||
if (mTarget && mRoot && !(aFlags & END_NO_IMMEDIATE_REDRAW)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче