Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use an explicit attribute to signal that a context prefers to use a d…
…iscrete GPU https://bugs.webkit.org/show_bug.cgi?id=80639 Reviewed by Stephen White. Source/Platform: Adds preferDiscreteGPU attribute to WebGraphicsContext3D::Attributes. Also remove the forUseOnAnotherThread attribute, this has been dead code for a while now. * chromium/public/WebGraphicsContext3D.h: (WebKit::WebGraphicsContext3D::Attributes::Attributes): (Attributes): Source/WebCore: On platforms that support both integrated and discrete GPUs and can dynamically switch between the two, we sometimes have a specific preference for a given context. Specifically, contexts used for WebGL and canvas 2d acceleration should use the discrete GPU if available, but compositor contexts can run fine on an integrated GPU. Instead of attempting to infer the intent from examining other context attributes, this adds an explicit attribute to control this behavior. * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::create): * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::Attributes::Attributes): (Attributes): * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::get): Source/WebKit/chromium: * src/GraphicsContext3DChromium.cpp: (WebCore::GraphicsContext3DPrivate::getContextAttributes): (WebCore::GraphicsContext3D::create): * src/WebViewImpl.cpp: (WebKit::WebViewImpl::createCompositorGraphicsContext3D): Canonical link: https://commits.webkit.org/97825@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
9 changed files
with
71 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters