Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Unified Diff: third_party/WebKit/Source/core/paint/ViewPainter.cpp

Issue 1632263002: Calculate and track display item opaqueness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove comment about moving bits Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/ViewPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ViewPainter.cpp b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
index e5ba958bf27a36728150d20d0f24393498364d3c..b46c9de853e844ab81be24b8024c326c06721251 100644
--- a/third_party/WebKit/Source/core/paint/ViewPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ViewPainter.cpp
@@ -129,10 +129,13 @@ void ViewPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo)
}
Color combinedBackgroundColor = shouldDrawBackgroundInSeparateBuffer ? rootBackgroundColor : baseBackgroundColor.blend(rootBackgroundColor);
- if (combinedBackgroundColor.alpha())
+ if (combinedBackgroundColor.alpha()) {
+ if (!combinedBackgroundColor.hasAlpha() && RuntimeEnabledFeatures::slimmingPaintV2Enabled())
+ recorder.setKnownToBeOpaque();
context.fillRect(backgroundRect, combinedBackgroundColor, (shouldDrawBackgroundInSeparateBuffer || shouldClearCanvas) ? SkXfermode::kSrc_Mode : SkXfermode::kSrcOver_Mode);
- else if (shouldClearCanvas && !shouldDrawBackgroundInSeparateBuffer)
+ } else if (shouldClearCanvas && !shouldDrawBackgroundInSeparateBuffer) {
context.fillRect(backgroundRect, Color(), SkXfermode::kClear_Mode);
+ }
for (auto it = reversedPaintList.rbegin(); it != reversedPaintList.rend(); ++it) {
ASSERT((*it)->clip() == BorderFillBox);

Powered by Google App Engine
This is Rietveld 408576698