Bug 793365: Make sure (again) that the entire buffer is valid when we might be asynchronously composited. r=roc

This commit is contained in:
Chris Jones
2012-09-24 21:15:18 -07:00
parent 152314f881
commit 30ee4bd1d9
5 changed files with 36 additions and 8 deletions

View File

@@ -4,11 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "BasicThebesLayer.h"
#include "gfxUtils.h"
#include "nsIWidget.h"
#include "RenderTrace.h"
#include "sampler.h"
#include "gfxUtils.h"
#include "prprf.h"
@@ -156,12 +155,17 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
{
uint32_t flags = 0;
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
gfxMatrix transform;
if (!GetEffectiveTransform().CanDraw2D(&transform) ||
transform.HasNonIntegerTranslation()) {
#ifndef MOZ_WIDGET_ANDROID
if (BasicManager()->CompositorMightResample()) {
flags |= ThebesLayerBuffer::PAINT_WILL_RESAMPLE;
}
if (!(flags & ThebesLayerBuffer::PAINT_WILL_RESAMPLE)) {
gfxMatrix transform;
if (!GetEffectiveTransform().CanDraw2D(&transform) ||
transform.HasNonIntegerTranslation()) {
flags |= ThebesLayerBuffer::PAINT_WILL_RESAMPLE;
}
}
#endif
if (mDrawAtomically) {
flags |= ThebesLayerBuffer::PAINT_NO_ROTATION;