Bug 1179298. ClientTiledPaintedLayer should allow empty transactions to succeed if it doesn't need to draw anything. r=mattwoodrow

ClientTiledPaintedLayer::RenderLayer was returning false immediately if there was no callback. It should check if it actually has to draw anything first, and then if it needs to paint it can return false if there is no callback.
This commit is contained in:
Timothy Nikkel 2015-07-02 12:50:15 -05:00
parent 2db71c193a
commit 7afb4241f1

View File

@ -393,10 +393,6 @@ ClientTiledPaintedLayer::RenderLayer()
LayerManager::DrawPaintedLayerCallback callback =
ClientManager()->GetPaintedLayerCallback();
void *data = ClientManager()->GetPaintedLayerCallbackData();
if (!callback) {
ClientManager()->SetTransactionIncomplete();
return;
}
if (!mContentClient) {
mContentClient = new TiledContentClient(this, ClientManager());
@ -442,6 +438,11 @@ ClientTiledPaintedLayer::RenderLayer()
return;
}
if (!callback) {
ClientManager()->SetTransactionIncomplete();
return;
}
if (!ClientManager()->IsRepeatTransaction()) {
// Only paint the mask layers on the first transaction.
RenderMaskLayers(this);