WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
164749
[WebGL] Migrate construction functions from pointers to references
https://bugs.webkit.org/show_bug.cgi?id=164749
Summary
[WebGL] Migrate construction functions from pointers to references
Myles C. Maxfield
Reported
2016-11-14 16:27:35 PST
[WebGL] Migrate construction functions from pointers to references
Attachments
Patch
(92.61 KB, patch)
2016-11-14 16:28 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(127.92 KB, patch)
2016-11-14 22:42 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(127.95 KB, patch)
2016-11-14 22:46 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(129.29 KB, patch)
2016-11-14 23:13 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(131.24 KB, patch)
2016-11-15 09:31 PST
,
Myles C. Maxfield
zalan
: review+
Details
Formatted Diff
Diff
Patch for committing
(133.00 KB, patch)
2016-11-15 10:44 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2016-11-14 16:28:10 PST
Created
attachment 294776
[details]
Patch
WebKit Commit Bot
Comment 2
2016-11-14 16:29:56 PST
Attachment 294776
[details]
did not pass style-queue: ERROR: Source/WebCore/html/canvas/WebGLSharedObject.cpp:39: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 2 in 81 files If any of these errors are false positives, please file a bug against check-webkit-style.
Myles C. Maxfield
Comment 3
2016-11-14 22:42:31 PST
Created
attachment 294814
[details]
Patch
Myles C. Maxfield
Comment 4
2016-11-14 22:46:14 PST
Created
attachment 294816
[details]
Patch
Myles C. Maxfield
Comment 5
2016-11-14 23:13:57 PST
Created
attachment 294819
[details]
Patch
Myles C. Maxfield
Comment 6
2016-11-15 09:31:48 PST
Created
attachment 294844
[details]
Patch
Dean Jackson
Comment 7
2016-11-15 10:18:24 PST
Comment on
attachment 294844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=294844&action=review
> Source/WebCore/html/canvas/ANGLEInstancedArrays.cpp:57 > + Extensions3D& extensions = context.graphicsContext3D()->getExtensions();
Use auto. Actually, how about removing the local variable altogether? return context.graphicsContext3D()->getExtensions().supports(...
> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:961 > + if (WebGLDepthTexture::supported(*graphicsContext3D()))
I wonder if graphicsContext3D() can return a ref? Is it ever null? I don't think so.
> Source/WebCore/html/canvas/WebGLCompressedTextureATC.cpp:55 > + Extensions3D& extensions = context.graphicsContext3D()->getExtensions();
auto or remove local var
> Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.cpp:57 > + Extensions3D& extensions = context.graphicsContext3D()->getExtensions();
same here
> Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp:57 > + Extensions3D& extensions = context.graphicsContext3D()->getExtensions();
auto
> Source/WebCore/html/canvas/WebGLDepthTexture.cpp:52 > + Extensions3D& extensions = context.getExtensions();
auto
> Source/WebCore/html/canvas/WebGLDrawBuffers.cpp:52 > + Extensions3D& extensions = context.graphicsContext3D()->getExtensions(); > + return extensions.supports("GL_EXT_draw_buffers")
auto or local var
> Source/WebCore/html/canvas/WebGLDrawBuffers.cpp:109 > + bool supportsDepth = (context->getExtensions().supports("GL_CHROMIUM_depth_texture") > + || context->getExtensions().supports("GL_OES_depth_texture") > + || context->getExtensions().supports("GL_ARB_depth_texture"));
We can remove the CHROMIUM one now.
> Source/WebCore/html/canvas/WebGLRenderingContext.cpp:215 > + && WebGLDepthTexture::supported(*graphicsContext3D())) { > if (!m_webglDepthTexture) { > - m_context->getExtensions()->ensureEnabled("GL_CHROMIUM_depth_texture"); > - m_webglDepthTexture = std::make_unique<WebGLDepthTexture>(this); > + m_context->getExtensions().ensureEnabled("GL_CHROMIUM_depth_texture"); > + m_webglDepthTexture = std::make_unique<WebGLDepthTexture>(*this);
I wonder if we need this at all.
> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:579 > + m_isErrorGeneratedOnOutOfBoundsAccesses = m_context->getExtensions().isEnabled("GL_CHROMIUM_strict_attribs"); > + m_isResourceSafe = m_context->getExtensions().isEnabled("GL_CHROMIUM_resource_safe");
Hmm... these must have standard names now. Or we don't nee them.
> Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp:45 > + Extensions3D& extensions = context()->graphicsContext3D()->getExtensions();
auto
Myles C. Maxfield
Comment 8
2016-11-15 10:44:48 PST
Created
attachment 294849
[details]
Patch for committing
Myles C. Maxfield
Comment 9
2016-11-15 10:45:02 PST
Comment on
attachment 294844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=294844&action=review
>> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:961 >> + if (WebGLDepthTexture::supported(*graphicsContext3D())) > > I wonder if graphicsContext3D() can return a ref? Is it ever null? I don't think so.
Unfortunately, WebGLRenderingContextBase::destroyGraphicsContext3D() sets it to nullptr.
>> Source/WebCore/html/canvas/WebGLDrawBuffers.cpp:109 >> + || context->getExtensions().supports("GL_ARB_depth_texture")); > > We can remove the CHROMIUM one now.
I'll do this in a follow-up patch.
Myles C. Maxfield
Comment 10
2016-11-15 11:34:14 PST
Comment on
attachment 294844
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=294844&action=review
>>> Source/WebCore/html/canvas/WebGLDrawBuffers.cpp:109 >>> + || context->getExtensions().supports("GL_ARB_depth_texture")); >> >> We can remove the CHROMIUM one now. > > I'll do this in a follow-up patch.
https://bugs.webkit.org/show_bug.cgi?id=164782
Myles C. Maxfield
Comment 11
2016-11-15 11:42:13 PST
Committed
r208740
: <
http://trac.webkit.org/changeset/208740
>
Csaba Osztrogonác
Comment 12
2016-11-16 00:49:28 PST
(In reply to
comment #11
)
> Committed
r208740
: <
http://trac.webkit.org/changeset/208740
>
It broke the WinCairo build, see build.webkit.org for details.
Csaba Osztrogonác
Comment 13
2016-11-17 09:22:04 PST
(In reply to
comment #12
)
> (In reply to
comment #11
) > > Committed
r208740
: <
http://trac.webkit.org/changeset/208740
> > > It broke the WinCairo build, see build.webkit.org for details.
https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/62839
Alex Christensen
Comment 14
2016-11-17 18:41:55 PST
http://trac.webkit.org/changeset/208873
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug