Bug 218972 - Use downcast instead of static_cast for casting GraphicsContextGL -> GraphicsContextGLOpenGL
Summary: Use downcast instead of static_cast for casting GraphicsContextGL -> Graphics...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 218333
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-16 01:31 PST by Kimmo Kinnunen
Modified: 2020-11-26 03:17 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmo Kinnunen 2020-11-16 01:31:14 PST
Use downcast instead of static_cast for casting GraphicsContextGL to GraphicsContextGLOpenGL
  
This is to be done only if removing !USE(ANGLE) from WebGL implementation is not possible.

https://bugs.webkit.org/show_bug.cgi?id=218333#c9

Simon Fraser (smfr) 2020-11-13 10:38:15 PST
>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:1790
>> +    static_cast<GraphicsContextGLOpenGL*>(m_context.get())->compressedTexImage2D(target, level, internalformat, width, height,

>I think you should add SPECIALIZE_TYPE_TRAITS macros and use downcast<> for all these casts.
Comment 1 Radar WebKit Bug Importer 2020-11-26 03:17:37 PST
<rdar://problem/71747680>