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); |