Bug 805939: Wait for shadow trees to update orientation before recompositing. r=cjones

This commit is contained in:
Chiajung Hung
2012-11-22 10:40:57 +08:00
parent 24ef8546b9
commit 728ef86c1a
18 changed files with 204 additions and 32 deletions

View File

@@ -15,6 +15,7 @@
#include "nsXULAppAPI.h"
#include "RenderTrace.h"
#include "sampler.h"
#include "Hal.h"
#define PIXMAN_DONT_DEFINE_STDINT
#include "pixman.h"
@@ -1094,7 +1095,17 @@ BasicShadowLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
// don't signal a new transaction to ShadowLayerForwarder. Carry on adding
// to the previous transaction.
if (HasShadowManager()) {
ShadowLayerForwarder::BeginTransaction(mTargetBounds, mTargetRotation);
ScreenOrientation orientation;
nsIntRect clientBounds;
if (TabChild* window = mWidget->GetOwningTabChild()) {
orientation = window->GetOrientation();
} else {
hal::ScreenConfiguration currentConfig;
hal::GetCurrentScreenConfiguration(&currentConfig);
orientation = currentConfig.orientation();
}
mWidget->GetClientBounds(clientBounds);
ShadowLayerForwarder::BeginTransaction(mTargetBounds, mTargetRotation, clientBounds, orientation);
// If we're drawing on behalf of a context with async pan/zoom
// enabled, then the entire buffer of thebes layers might be