Remove unnecessary checks in PaintLayer::backgroundIsKnownToBeOpaqueInRect

The PaintLayer::backgroundIsKnownToBeOpaque method is currently
only called by GraphicsLayers on their owning paint layer, or
by the recursive child call. The former is by definition
always called on a self painting layer, while the latter
already has a test to prevent consideration of layers that
do not paint into the backing in question. Hence we can
remove the check for self painting layer status.

Also convert a test for dirty stacking order lists to a
DCHECK, because the test never fires on any layout test.

These checks cause chicken-and-egg problems when the method
is called by the layer itself in order to identify compositing
reasons. In such cases we are not concerned with self layer
status; we are in fact trying to determine that status.

R=chrishtr@chromium.org
BUG=381840
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2297873002
Cr-Commit-Position: refs/heads/master@{#416628}
1 file changed