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

Unified Diff: third_party/WebKit/Source/core/css/CSSPaintValue.cpp

Issue 2077413005: Add "alpha" option to PaintWorklet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set alpha to be true by default Created 4 years, 5 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/css/CSSPaintValue.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSPaintValue.cpp b/third_party/WebKit/Source/core/css/CSSPaintValue.cpp
index 9a4a640b144d2696d3d0554823fc6a919a08aa34..82cc7572596e06db94df34350b3630e34051cc60 100644
--- a/third_party/WebKit/Source/core/css/CSSPaintValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPaintValue.cpp
@@ -56,6 +56,11 @@ void CSSPaintValue::paintImageGeneratorReady()
}
}
+bool CSSPaintValue::knownToBeOpaque(const LayoutObject& layoutObject) const
+{
+ return m_generator && !m_generator->hasAlpha();
+}
+
bool CSSPaintValue::equals(const CSSPaintValue& other) const
{
return name() == other.name();
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPaintValue.h ('k') | third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698