Title: [212783] trunk/Source/WebCore
- Revision
- 212783
- Author
- [email protected]
- Date
- 2017-02-21 17:18:31 -0800 (Tue, 21 Feb 2017)
Log Message
No need for static attributes when creating a pixel format
https://bugs.webkit.org/show_bug.cgi?id=168688
<rdar://problem/30642256>
Reviewed by Myles Maxfield.
Just create the attributes when needed.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3DManager::updateHighPerformanceState):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (212782 => 212783)
--- trunk/Source/WebCore/ChangeLog 2017-02-22 01:16:42 UTC (rev 212782)
+++ trunk/Source/WebCore/ChangeLog 2017-02-22 01:18:31 UTC (rev 212783)
@@ -1,3 +1,16 @@
+2017-02-21 Dean Jackson <[email protected]>
+
+ No need for static attributes when creating a pixel format
+ https://bugs.webkit.org/show_bug.cgi?id=168688
+ <rdar://problem/30642256>
+
+ Reviewed by Myles Maxfield.
+
+ Just create the attributes when needed.
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
+
2017-02-20 Filip Pizlo <[email protected]>
The collector thread should only start when the mutator doesn't have heap access
Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (212782 => 212783)
--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2017-02-22 01:16:42 UTC (rev 212782)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2017-02-22 01:18:31 UTC (rev 212783)
@@ -265,16 +265,9 @@
if (!m_pixelFormatObj) {
LOG(WebGL, "Turning on high-performance GPU.");
- static NeverDestroyed<Vector<CGLPixelFormatAttribute>> pixelFormatAttributes;
- Vector<CGLPixelFormatAttribute>& attributes = pixelFormatAttributes.get();
- if (!attributes.size()) {
- attributes.append(kCGLPFAAccelerated);
- attributes.append(kCGLPFAColorSize);
- attributes.append(static_cast<CGLPixelFormatAttribute>(32));
- attributes.append(static_cast<CGLPixelFormatAttribute>(0));
- }
+ CGLPixelFormatAttribute attributes[] = { kCGLPFAAccelerated, kCGLPFAColorSize, static_cast<CGLPixelFormatAttribute>(32), static_cast<CGLPixelFormatAttribute>(0) };
GLint numPixelFormats = 0;
- CGLChoosePixelFormat(attributes.data(), &m_pixelFormatObj, &numPixelFormats);
+ CGLChoosePixelFormat(attributes, &m_pixelFormatObj, &numPixelFormats);
}
} else if (m_pixelFormatObj) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes