Add comments to the condition in PopThebesLayerData() that decides whether we want to optimize a thebes layer to an image or color layer

RESOLVED FIXED in mozilla31

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mstange, Assigned: mstange)

Tracking

Trunk
mozilla31
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

5 years ago
The condition

> if (isRetained && (data->mIsSolidColorInVisibleRegion || imageContainer) &&
>     (data->mLayer->GetValidRegion().IsEmpty() || mLayerBuilder->CheckInLayerTreeCompressionMode())) {

completely went over my head when I read it the first time, and I had to do some extended bugzilla archeology in order to understand it completely. Some comments would be very helpful. This patch adds them.
Attachment #8395505 - Flags: review?(roc)
Comment on attachment 8395505 [details] [diff] [review]
document-optimization-to-color-or-image-layer

Review of attachment 8395505 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/FrameLayerBuilder.cpp
@@ +1896,5 @@
>    nsRefPtr<Layer> layer;
>    nsRefPtr<ImageContainer> imageContainer = data->CanOptimizeImageLayer(mBuilder);
>  
> +  if ((aData->mIsSolidColorInVisibleRegion || imageContainer) &&
> +      ShouldOptimizeAwayThebesLayer(data, mLayerBuilder)) {

Name it "CanOptimizeAwayThebesLayer"
Attachment #8395505 - Flags: review?(roc) → review+
Assignee

Comment 2

5 years ago
Posted patch v2Splinter Review
Attachment #8395505 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/94df6fc66986
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.