[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
paroga at webkit.org
paroga at webkit.org
Wed Dec 22 14:53:55 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit f1e3a3e281240ac3149f1160166ba8c81231c39c
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 23 15:08:40 2010 +0000
2010-10-23 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Add Gradient::hasAlpha
https://bugs.webkit.org/show_bug.cgi?id=48183
WinCE can do some performance improvements if the gradient is opaque.
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::hasAlpha):
* platform/graphics/Gradient.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70389 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b997462..79041ce 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-23 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Add Gradient::hasAlpha
+ https://bugs.webkit.org/show_bug.cgi?id=48183
+
+ WinCE can do some performance improvements if the gradient is opaque.
+
+ * platform/graphics/Gradient.cpp:
+ (WebCore::Gradient::hasAlpha):
+ * platform/graphics/Gradient.h:
+
2010-10-23 Gyuyoung Kim <gyuyoung.kim at samsung.com>
Reviewed by David Kilzer.
diff --git a/WebCore/platform/graphics/Gradient.cpp b/WebCore/platform/graphics/Gradient.cpp
index 8bc9b3f..da60f3b 100644
--- a/WebCore/platform/graphics/Gradient.cpp
+++ b/WebCore/platform/graphics/Gradient.cpp
@@ -196,6 +196,16 @@ int Gradient::findStop(float value) const
return m_lastStop;
}
+bool Gradient::hasAlpha() const
+{
+ for (size_t i = 0; i < m_stops.size(); i++) {
+ if (m_stops[i].alpha < 1)
+ return true;
+ }
+
+ return false;
+}
+
void Gradient::setSpreadMethod(GradientSpreadMethod spreadMethod)
{
// FIXME: Should it become necessary, allow calls to this method after m_gradient has been set.
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 6fad810..1365406 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -87,6 +87,7 @@ namespace WebCore {
void addColorStop(float, const Color&);
void getColor(float value, float* r, float* g, float* b, float* a) const;
+ bool hasAlpha() const;
bool isRadial() const { return m_radial; }
bool isZeroSize() const { return m_p0.x() == m_p1.x() && m_p0.y() == m_p1.y() && (!m_radial || m_r0 == m_r1); }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list