Bug 1339625 - Unlock textures before calling updated r=kats

This commit is contained in:
Matt Woodrow 2017-02-17 20:59:50 +09:00
Родитель fc38025d15
Коммит 3aa63472d7
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -18,11 +18,13 @@ namespace layers {
using namespace mozilla::gfx;
void
WebRenderPaintedLayer::PaintThebes()
WebRenderPaintedLayer::PaintThebes(nsTArray<ReadbackProcessor::Update>* aReadbackUpdates)
{
PROFILER_LABEL("WebRenderPaintedLayer", "PaintThebes",
js::ProfileEntry::Category::GRAPHICS);
mContentClient->BeginPaint();
uint32_t flags = RotatedContentBuffer::PAINT_CAN_DRAW_ROTATED;
PaintState state =
@ -66,6 +68,9 @@ WebRenderPaintedLayer::PaintThebes()
mContentClient->ReturnDrawTargetToBuffer(target);
didUpdate = true;
}
mContentClient->EndPaint(aReadbackUpdates);
if (didUpdate) {
Mutated();
@ -100,10 +105,7 @@ WebRenderPaintedLayer::RenderLayerWithReadback(ReadbackProcessor *aReadback)
aReadback->GetPaintedLayerUpdates(this, &readbackUpdates);
}
IntPoint origin(mVisibleRegion.GetBounds().x, mVisibleRegion.GetBounds().y);
mContentClient->BeginPaint();
PaintThebes();
mContentClient->EndPaint(&readbackUpdates);
PaintThebes(&readbackUpdates);
}
void

Просмотреть файл

@ -52,7 +52,7 @@ public:
Layer* GetLayer() override { return this; }
void RenderLayer() override;
void PaintThebes();
void PaintThebes(nsTArray<ReadbackProcessor::Update>* aReadbackUpdates);
void RenderLayerWithReadback(ReadbackProcessor *aReadback);
RefPtr<ContentClient> mContentClient;
};