Changeset 252055 in webkit
- Timestamp:
- Nov 5, 2019 8:52:31 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252047 r252055 1 2019-11-05 James Darpinian <jdarpinian@chromium.org> 2 3 Enable powerPreference controlled GPU switching with ANGLE 4 https://bugs.webkit.org/show_bug.cgi?id=203773 5 6 GPU switching can't be controlled from within ANGLE running in the content process 7 due to sandbox restrictions. So we need to continue using the existing 8 HighPerformanceGPUManager path with ANGLE. 9 10 Although the high power GPU is activated on request with this change, ANGLE does 11 not use it yet. 12 13 Reviewed by Alex Christensen. 14 15 * platform/graphics/GraphicsContext3D.cpp: 16 * platform/graphics/GraphicsContext3D.h: 17 * platform/graphics/GraphicsContext3DManager.cpp: 18 (WebCore::GraphicsContext3DManager::updateHighPerformanceState): 19 (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired): 20 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: 21 (WebCore::GraphicsContext3D::GraphicsContext3D): 22 1 23 2019-11-05 youenn fablet <youenn@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp
r229858 r252055 657 657 } 658 658 659 #if !(PLATFORM(COCOA) && USE(OPENGL))659 #if !(PLATFORM(COCOA) && (USE(OPENGL) || USE(ANGLE))) 660 660 void GraphicsContext3D::setContextVisibility(bool) 661 661 { -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r247452 r252055 1568 1568 #endif 1569 1569 1570 #if PLATFORM(COCOA) && USE(OPENGL)1570 #if PLATFORM(COCOA) && (USE(OPENGL) || USE(ANGLE)) 1571 1571 bool m_hasSwitchedToHighPerformanceGPU { false }; 1572 1572 #endif -
trunk/Source/WebCore/platform/graphics/GraphicsContext3DManager.cpp
r247453 r252055 36 36 #endif 37 37 38 #if PLATFORM(MAC) && USE(OPENGL)38 #if PLATFORM(MAC) && (USE(OPENGL) || USE(ANGLE)) 39 39 #include "SwitchingGPUClient.h" 40 40 #include <OpenGL/OpenGL.h> … … 223 223 void GraphicsContext3DManager::updateHighPerformanceState() 224 224 { 225 #if PLATFORM(MAC) && USE(OPENGL)225 #if PLATFORM(MAC) && (USE(OPENGL) || USE(ANGLE)) 226 226 if (!hasLowAndHighPowerGPUs()) 227 227 return; … … 263 263 264 264 m_requestingHighPerformance = false; 265 #if PLATFORM(MAC) && USE(OPENGL)265 #if PLATFORM(MAC) && (USE(OPENGL) || USE(ANGLE)) 266 266 SwitchingGPUClient::singleton().releaseHighPerformanceGPU(); 267 267 #endif -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
r250740 r252055 179 179 } 180 180 181 #endif // PLATFORM(MAC) && USE(OPENGL)181 #endif // PLATFORM(MAC) && (USE(OPENGL) || USE(ANGLE)) 182 182 183 183 GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle, GraphicsContext3D* sharedContext) … … 185 185 , m_private(makeUnique<GraphicsContext3DPrivate>(this)) 186 186 { 187 188 #if HAVE(APPLE_GRAPHICS_CONTROL) 189 m_powerPreferenceUsedForCreation = (hasLowAndHighPowerGPUs() && attrs.powerPreference == GraphicsContext3DPowerPreference::HighPerformance) ? GraphicsContext3DPowerPreference::HighPerformance : GraphicsContext3DPowerPreference::Default; 190 #else 191 m_powerPreferenceUsedForCreation = GraphicsContext3DPowerPreference::Default; 192 #endif 193 187 194 #if !USE(ANGLE) 188 195 #if USE(OPENGL_ES) … … 209 216 ::glEnable(GraphicsContext3D::PRIMITIVE_RESTART_FIXED_INDEX); 210 217 #elif USE(OPENGL) 211 212 #if HAVE(APPLE_GRAPHICS_CONTROL)213 m_powerPreferenceUsedForCreation = (hasLowAndHighPowerGPUs() && attrs.powerPreference == GraphicsContext3DPowerPreference::HighPerformance) ? GraphicsContext3DPowerPreference::HighPerformance : GraphicsContext3DPowerPreference::Default;214 #else215 m_powerPreferenceUsedForCreation = GraphicsContext3DPowerPreference::Default;216 #endif217 218 218 219 bool useMultisampling = m_attrs.antialias; … … 700 701 } 701 702 703 #endif // USE(OPENGL) 704 705 #if USE(OPENGL) || USE(ANGLE) 702 706 void GraphicsContext3D::setContextVisibility(bool isVisible) 703 707 { … … 709 713 } 710 714 } 711 #endif // USE(OPENGL) 715 #endif // USE(OPENGL) || USE(ANGLE) 712 716 713 717 #if USE(ANGLE)
Note: See TracChangeset
for help on using the changeset viewer.