[chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 19:24:40 +0000 (19:24 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 19:24:40 +0000 (19:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82066

Reviewed by James Robinson.

With threaded compositing, OSX will crash and Windows will have black
scrollbars. Fix that by reverting to the previosu behavior of updating
scrollbars on the main thread instead.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::scrollbarLayerDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111886 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp

index 2b34e04c3dbfdd3dddc189af939ce0810ad4fafc..7370fbf3c301b56277f407eb669bda2bf0f32b1f 100644 (file)
@@ -1,3 +1,17 @@
+2012-03-23  Adrienne Walker  <enne@google.com>
+
+        [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
+        https://bugs.webkit.org/show_bug.cgi?id=82066
+
+        Reviewed by James Robinson.
+
+        With threaded compositing, OSX will crash and Windows will have black
+        scrollbars. Fix that by reverting to the previosu behavior of updating
+        scrollbars on the main thread instead.
+
+        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+        (WebCore::scrollbarLayerDidChange):
+
 2012-03-23  Dan Bernstein  <mitz@apple.com>
 
         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
index 0174405b59ec488b990f39dd772c7e9891087692..d56cf493313d693e22fa34394a53263a494624e5 100644 (file)
@@ -98,7 +98,14 @@ static void scrollbarLayerDidChange(Scrollbar* scrollbar, LayerChromium* scrollL
     if (!scrollbarGraphicsLayer->contentsOpaque())
         scrollbarGraphicsLayer->setContentsOpaque(isOpaqueRootScrollbar);
 
-    if (scrollbar->isCustomScrollbar() || !CCProxy::hasImplThread()) {
+    // Only certain platforms support the way that scrollbars are currently
+    // being painted on the impl thread. For example, Cocoa is not threadsafe.
+    bool platformSupported = false;
+#if OS(LINUX)
+    platformSupported = true;
+#endif
+
+    if (scrollbar->isCustomScrollbar() || !CCProxy::hasImplThread() || !platformSupported) {
         scrollbarGraphicsLayer->setContentsToMedia(0);
         scrollbarGraphicsLayer->setDrawsContent(true);
         return;