summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-10-03 09:26:49 -0700
committerJohn Reck <jreck@google.com>2011-10-03 14:22:37 -0700
commitb31c03a968a578cc43e606ede80cefcd07e8ee07 (patch)
tree9dbcf1b515b55b1e41d476632320e440f10824d6 /Source/WebCore/platform/graphics/android
parent89829a24e4efac83486ad878de3438e272aeeddf (diff)
downloadexternal_webkit-b31c03a968a578cc43e606ede80cefcd07e8ee07.zip
external_webkit-b31c03a968a578cc43e606ede80cefcd07e8ee07.tar.gz
external_webkit-b31c03a968a578cc43e606ede80cefcd07e8ee07.tar.bz2
HW accelate button focus rings
Bug: 5353510 Change-Id: I1bb306381864357dab4c38fd5c182fda2dd08d8c
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp5
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 85fa23f..2f62223 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -183,7 +183,7 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const SkRegion& inval
TilesManager::instance()->setShowVisualIndicator(showVisualIndicator);
}
-void GLWebViewState::setRings(Vector<IntRect>& rings, bool isPressed)
+void GLWebViewState::setRings(Vector<IntRect>& rings, bool isPressed, bool isButton)
{
android::Mutex::Autolock lock(m_baseLayerLock);
m_displayRings = true;
@@ -195,6 +195,7 @@ void GLWebViewState::setRings(Vector<IntRect>& rings, bool isPressed)
m_rings.op(rings.at(i), SkRegion::kUnion_Op);
}
m_ringsIsPressed = isPressed;
+ m_ringsIsButton = isButton;
}
void GLWebViewState::invalRegion(const SkRegion& region)
@@ -294,6 +295,8 @@ void GLWebViewState::paintExtras()
rgnIter.next();
}
}
+ if (m_ringsIsButton && m_ringsIsPressed)
+ return;
SkPath path;
if (!m_rings.getBoundaryPath(&path))
return;
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.h b/Source/WebCore/platform/graphics/android/GLWebViewState.h
index 6c7d31e..27e8148 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.h
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.h
@@ -177,7 +177,7 @@ public:
void setExtra(BaseLayerAndroid*, SkPicture&, const IntRect&, bool allowSame);
void paintExtras();
- void setRings(Vector<IntRect>& rings, bool isPressed);
+ void setRings(Vector<IntRect>& rings, bool isPressed, bool isButton);
void resetRings();
void drawFocusRing(SkRect& rect);
@@ -271,6 +271,7 @@ private:
bool m_displayRings;
SkRegion m_rings;
bool m_ringsIsPressed;
+ bool m_ringsIsButton;
int m_focusRingTexture;
bool m_isScrolling;