WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174452
Clean-up some things in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=174452
Summary
Clean-up some things in GraphicsContext3D
Dean Jackson
Reported
2017-07-12 19:18:15 PDT
Clean-up some things in GraphicsContext3D
Attachments
Patch
(8.11 KB, patch)
2017-07-12 19:25 PDT
,
Dean Jackson
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-07-12 19:18:51 PDT
<
rdar://problem/33281257
>
Dean Jackson
Comment 2
2017-07-12 19:25:02 PDT
Created
attachment 315326
[details]
Patch
Dean Jackson
Comment 3
2017-07-12 19:36:26 PDT
Requires 174345 to apply cleanly.
Simon Fraser (smfr)
Comment 4
2017-07-13 14:15:12 PDT
Comment on
attachment 315326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=315326&action=review
> Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:-576 > -#if USE(COORDINATED_GRAPHICS_THREADED) > - ::glDeleteTextures(1, &m_compositorTexture); > -#endif
Why can this go away?
> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:315 > + ASSERT(width >= 0 && height >= 0);
Can this assert fire if JS passes bad values from script? If so, don't assert.
Dean Jackson
Comment 5
2017-07-13 15:40:36 PDT
(In reply to Simon Fraser (smfr) from
comment #4
)
> Comment on
attachment 315326
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=315326&action=review
> > > Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm:-576 > > -#if USE(COORDINATED_GRAPHICS_THREADED) > > - ::glDeleteTextures(1, &m_compositorTexture); > > -#endif > > Why can this go away?
Mentioned in the ChangeLog :) We don't use COORDINATED_GRAPHICS_THREADED on Apple platforms.
> > > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:315 > > + ASSERT(width >= 0 && height >= 0); > > Can this assert fire if JS passes bad values from script? If so, don't > assert.
I don't really understand why these were int to begin with. You can't have a canvas with negative dimensions. I expect that we catch it in the bindings.
Dean Jackson
Comment 6
2017-07-13 16:00:18 PDT
Committed
r219473
: <
http://trac.webkit.org/changeset/219473
>
Darin Adler
Comment 7
2017-07-25 09:28:57 PDT
Comment on
attachment 315326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=315326&action=review
>>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:315 >>> + ASSERT(width >= 0 && height >= 0); >> >> Can this assert fire if JS passes bad values from script? If so, don't assert. > > I don't really understand why these were int to begin with. You can't have a canvas with negative dimensions. I expect that we catch it in the bindings.
General WebKit style note: We try not to write a single assertion with &&. Instead we write two assertions on separate lines, so we can tell which one failed.
Dean Jackson
Comment 8
2017-07-25 13:41:16 PDT
Comment on
attachment 315326
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=315326&action=review
>>>> Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:315 >>>> + ASSERT(width >= 0 && height >= 0); >>> >>> Can this assert fire if JS passes bad values from script? If so, don't assert. >> >> I don't really understand why these were int to begin with. You can't have a canvas with negative dimensions. I expect that we catch it in the bindings. > > General WebKit style note: We try not to write a single assertion with &&. Instead we write two assertions on separate lines, so we can tell which one failed.
Thanks Darin.
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