[chromium] Use SkRegion clip for compositor painting
Created attachment 150663 [details] Patch
This still needs some investigation into how opaque region tracking is affected by this, but I just wanted to put up an initial patch.
Right now it would prevent any opaque tracking. In OpaqueRegionSkia::didDraw: // Apply the current clip. SkRect deviceClipRect; if (!getDeviceClipAsRect(context, deviceClipRect)) fillsBounds = false; else if (!targetRect.intersect(deviceClipRect)) return; This would cause fillsBounds = false. When that's the case it doesn't try to mark anything as opaque as it's not sure what parts to mark. If the clip is a non-rect, but the bounds of the didDraw rect intersected with the clip is still a rect, then we could use that as "targetRect" and keep fillsBounds = true. How to do this in an efficient way with the Skia API is something to explore.
(In reply to comment #3) > Right now it would prevent any opaque tracking. Ugh. Thanks for pointing that out. I was hoping this would be a small change for some performance benefit, but if it breaks opaque tracking then maybe it's not worth it. I could always just turn this on for already opaque layers (i.e. NCCH) which would handle the case I was trying to improve (http://crbug.com/135004), but that seems like a bit of a hack too. I don't think this approach is right, so I'll just mark this as invalid.