Only queue a ContentClient buffer state if it has operations (bug 1427089, r=dvander)

--HG--
extra : rebase_source : 200e59db7a140b0981b1d07ebf6d8ee241336322
This commit is contained in:
Ryan Hunt 2018-01-03 16:55:01 -06:00
parent f007b19e6f
commit bc65f35f15
2 changed files with 6 additions and 1 deletions

View File

@ -116,6 +116,11 @@ public:
*/
bool PrepareBuffer();
bool HasOperations() const
{
return mBufferFinalize || mBufferUnrotate || mBufferInitialize;
}
template<typename F>
void ForEachTextureClient(F aClosure) const
{

View File

@ -228,7 +228,7 @@ ClientPaintedLayer::PaintOffMainThread()
uint32_t flags = GetPaintFlags();
PaintState state = mContentClient->BeginPaint(this, flags | ContentClient::PAINT_ASYNC);
if (state.mBufferState) {
if (state.mBufferState && state.mBufferState->HasOperations()) {
PaintThread::Get()->PrepareBuffer(state.mBufferState);
asyncPaints.Queue();
}