Commit 13feec20 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Disable DrawingDisplayItem opaqueness detection for pre-CompositeAfterPaint

The result has no effect in pre-CompositeAfterPaint. Disable it to avoid
performance impact and reduce risk.

Bug: 1064712
Change-Id: I4f826c719c581b86b6ff2508b710508ef291e788
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122618Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753787}
parent e04542ea
......@@ -37,6 +37,8 @@ class PLATFORM_EXPORT DrawingDisplayItem : public DisplayItem {
bool Equals(const DisplayItem& other) const final;
bool KnownToBeOpaque() const {
if (!RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
return false;
if (!known_to_be_opaque_.has_value())
known_to_be_opaque_.emplace(CalculateKnownToBeOpaque(record_.get()));
return *known_to_be_opaque_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment