Changeset 82966 in webkit
- Timestamp:
- Apr 5, 2011 12:33:44 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r82960 r82966 1 2011-04-05 Adam Roben <aroben@apple.com> 2 3 Disable accelerated compositing on Windows machines that don't support it 4 5 This includes machines without the necessary graphics hardware, and machines without 6 WebKitQuartzCoreAdditions (like the Windows 7 Release (WebKit2 Tests) bots). 7 8 Fixes <http://webkit.org/b/57870> REGRESSION (r82960): Lots of tests crashing in 9 DrawingAreaImpl::enterAcceleratedCompositingMode on Windows 7 Release (WebKit2 Tests) 10 11 Reviewed by Anders Carlsson. 12 13 * WebProcess/WebPage/LayerTreeHost.h: 14 (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. On platforms other than 15 Windows, this always returns true. 16 17 * WebProcess/WebPage/WebPage.cpp: 18 (WebKit::WebPage::updatePreferences): Only enable accelerated compositing-related 19 preferences if the machine supports accelerated compositing. 20 21 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: 22 (WebKit::LayerTreeHostCAWin::supportsAcceleratedCompositing): Added. Creates a view, asks it 23 if it can draw, and returns the result. 24 25 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added supportsAcceleratedCompositing. 26 27 * WebProcess/WebPage/win/LayerTreeHostWin.cpp: Added. 28 (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. Calls through to 29 LayerTreeHostCAWin in configurations that support that class. Otherwise just returns false. 30 31 * win/WebKit2.vcproj: Added LayerTreeHostWin.cpp. Let VS reorder some other files. 32 1 33 2011-04-05 Adam Roben <aroben@apple.com> 2 34 -
trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
r82959 r82966 47 47 virtual ~LayerTreeHost(); 48 48 49 static bool supportsAcceleratedCompositing(); 50 49 51 virtual const LayerTreeContext& layerTreeContext() = 0; 50 52 virtual void scheduleLayerFlush() = 0; … … 75 77 }; 76 78 79 #if !PLATFORM(WIN) 80 inline bool LayerTreeHost::supportsAcceleratedCompositing() 81 { 82 return true; 83 } 84 #endif 85 77 86 } // namespace WebKit 78 87 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r82960 r82966 33 33 #include "InjectedBundle.h" 34 34 #include "InjectedBundleBackForwardList.h" 35 #include "LayerTreeHost.h" 35 36 #include "MessageID.h" 36 37 #include "NetscapePlugin.h" … … 1412 1413 settings->setDefaultFixedFontSize(store.getUInt32ValueForKey(WebPreferencesKey::defaultFixedFontSizeKey())); 1413 1414 1414 settings->setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()) );1415 settings->setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()) );1416 settings->setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()) );1415 settings->setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()) && LayerTreeHost::supportsAcceleratedCompositing()); 1416 settings->setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()) && LayerTreeHost::supportsAcceleratedCompositing()); 1417 settings->setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()) && LayerTreeHost::supportsAcceleratedCompositing()); 1417 1418 settings->setShowDebugBorders(store.getBoolValueForKey(WebPreferencesKey::compositingBordersVisibleKey())); 1418 1419 settings->setShowRepaintCounter(store.getBoolValueForKey(WebPreferencesKey::compositingRepaintCountersVisibleKey())); -
trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp
r82960 r82966 77 77 } 78 78 79 bool LayerTreeHostCAWin::supportsAcceleratedCompositing() 80 { 81 static bool initialized; 82 static bool supportsAcceleratedCompositing; 83 if (initialized) 84 return supportsAcceleratedCompositing; 85 initialized = true; 86 87 ASSERT(!dummyWindow); 88 dummyWindow = createDummyWindow(); 89 RetainPtr<WKCACFViewRef> view(AdoptCF, WKCACFViewCreate(kWKCACFViewDrawingDestinationImage)); 90 CGRect fakeBounds = CGRectMake(0, 0, 10, 10); 91 WKCACFViewUpdate(view.get(), dummyWindow, &fakeBounds); 92 93 supportsAcceleratedCompositing = WKCACFViewCanDraw(view.get()); 94 95 WKCACFViewUpdate(view.get(), 0, 0); 96 ::DestroyWindow(dummyWindow); 97 dummyWindow = 0; 98 99 return supportsAcceleratedCompositing; 100 } 101 79 102 PassRefPtr<LayerTreeHostCAWin> LayerTreeHostCAWin::create(WebPage* webPage) 80 103 { -
trunk/Source/WebKit2/WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h
r82960 r82966 42 42 class LayerTreeHostCAWin : public LayerTreeHostCA, private WebCore::AbstractCACFLayerTreeHost { 43 43 public: 44 static bool supportsAcceleratedCompositing(); 45 44 46 static PassRefPtr<LayerTreeHostCAWin> create(WebPage*); 45 47 virtual ~LayerTreeHostCAWin(); -
trunk/Source/WebKit2/win/WebKit2.vcproj
r82839 r82966 1906 1906 </File> 1907 1907 <File 1908 RelativePath="..\WebProcess\WebPage\win\LayerTreeHostWin.cpp" 1909 > 1910 </File> 1911 <File 1908 1912 RelativePath="..\WebProcess\WebPage\win\WebInspectorWin.cpp" 1909 1913 > … … 2768 2772 </File> 2769 2773 <File 2774 RelativePath="..\UIProcess\WebIconDatabase.messages.in" 2775 > 2776 </File> 2777 <File 2770 2778 RelativePath="..\UIProcess\WebIconDatabaseClient.cpp" 2771 2779 > … … 2773 2781 <File 2774 2782 RelativePath="..\UIProcess\WebIconDatabaseClient.h" 2775 >2776 </File>2777 <File2778 RelativePath="..\UIProcess\WebIconDatabase.messages.in"2779 2783 > 2780 2784 </File>
Note: See TracChangeset
for help on using the changeset viewer.