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();
|
||||
|
||||
uint32_t flags = 0;
|
||||
uint32_t flags = RotatedContentBuffer::PAINT_CAN_DRAW_ROTATED;
|
||||
#ifndef MOZ_WIDGET_ANDROID
|
||||
if (ClientManager()->CompositorMightResample()) {
|
||||
flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE;
|
||||
@ -68,14 +68,15 @@ ClientThebesLayer::PaintThebes()
|
||||
GetEffectiveVisibleRegion());
|
||||
|
||||
bool didUpdate = false;
|
||||
if (DrawTarget* target = mContentClient->BorrowDrawTargetForPainting(state)) {
|
||||
RotatedContentBuffer::DrawIterator iter;
|
||||
while (DrawTarget* target = mContentClient->BorrowDrawTargetForPainting(state, &iter)) {
|
||||
SetAntialiasingFlags(this, target);
|
||||
|
||||
nsRefPtr<gfxContext> ctx = gfxContext::ContextForDrawTarget(target);
|
||||
|
||||
ClientManager()->GetThebesLayerCallback()(this,
|
||||
ctx,
|
||||
state.mRegionToDraw,
|
||||
iter.mDrawRegion,
|
||||
state.mClip,
|
||||
state.mRegionToInvalidate,
|
||||
ClientManager()->GetThebesLayerCallbackData());
|
||||
@ -83,12 +84,6 @@ ClientThebesLayer::PaintThebes()
|
||||
ctx = nullptr;
|
||||
mContentClient->ReturnDrawTargetToBuffer(target);
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user