mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992486 - Part 4: Make ClientThebesLayer use multiple draws. r=roc
This commit is contained in:
parent
85f537988a
commit
4fb665e081
@ -40,7 +40,7 @@ ClientThebesLayer::PaintThebes()
|
|||||||
|
|
||||||
mContentClient->PrepareFrame();
|
mContentClient->PrepareFrame();
|
||||||
|
|
||||||
uint32_t flags = 0;
|
uint32_t flags = RotatedContentBuffer::PAINT_CAN_DRAW_ROTATED;
|
||||||
#ifndef MOZ_WIDGET_ANDROID
|
#ifndef MOZ_WIDGET_ANDROID
|
||||||
if (ClientManager()->CompositorMightResample()) {
|
if (ClientManager()->CompositorMightResample()) {
|
||||||
flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE;
|
flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE;
|
||||||
@ -68,14 +68,15 @@ ClientThebesLayer::PaintThebes()
|
|||||||
GetEffectiveVisibleRegion());
|
GetEffectiveVisibleRegion());
|
||||||
|
|
||||||
bool didUpdate = false;
|
bool didUpdate = false;
|
||||||
if (DrawTarget* target = mContentClient->BorrowDrawTargetForPainting(state)) {
|
RotatedContentBuffer::DrawIterator iter;
|
||||||
|
while (DrawTarget* target = mContentClient->BorrowDrawTargetForPainting(state, &iter)) {
|
||||||
SetAntialiasingFlags(this, target);
|
SetAntialiasingFlags(this, target);
|
||||||
|
|
||||||
nsRefPtr<gfxContext> ctx = gfxContext::ContextForDrawTarget(target);
|
nsRefPtr<gfxContext> ctx = gfxContext::ContextForDrawTarget(target);
|
||||||
|
|
||||||
ClientManager()->GetThebesLayerCallback()(this,
|
ClientManager()->GetThebesLayerCallback()(this,
|
||||||
ctx,
|
ctx,
|
||||||
state.mRegionToDraw,
|
iter.mDrawRegion,
|
||||||
state.mClip,
|
state.mClip,
|
||||||
state.mRegionToInvalidate,
|
state.mRegionToInvalidate,
|
||||||
ClientManager()->GetThebesLayerCallbackData());
|
ClientManager()->GetThebesLayerCallbackData());
|
||||||
@ -83,12 +84,6 @@ ClientThebesLayer::PaintThebes()
|
|||||||
ctx = nullptr;
|
ctx = nullptr;
|
||||||
mContentClient->ReturnDrawTargetToBuffer(target);
|
mContentClient->ReturnDrawTargetToBuffer(target);
|
||||||
didUpdate = true;
|
didUpdate = true;
|
||||||
} else {
|
|
||||||
// It's possible that state.mRegionToInvalidate is nonempty here,
|
|
||||||
// if we are shrinking the valid region to nothing. So use mRegionToDraw
|
|
||||||
// instead.
|
|
||||||
NS_WARN_IF_FALSE(state.mRegionToDraw.IsEmpty(),
|
|
||||||
"No context when we have something to draw, resource exhaustion?");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (didUpdate) {
|
if (didUpdate) {
|
||||||
|
Loading…
Reference in New Issue
Block a user