WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 67832
[chromium] Add GraphicsContext3DPrivate:createGraphicsContextForAnotherThread
https://bugs.webkit.org/show_bug.cgi?id=67832
Summary
[chromium] Add GraphicsContext3DPrivate:createGraphicsContextForAnotherThread
Nat Duca
Reported
2011-09-08 21:01:47 PDT
[chromium] Add GraphicsContext3DPrivate:createGraphicsContextForAnotherThread
Attachments
Patch
(12.76 KB, patch)
2011-09-08 21:22 PDT
,
Nat Duca
no flags
Details
Formatted Diff
Diff
now with comments.
(13.75 KB, patch)
2011-09-09 08:50 PDT
,
Nat Duca
no flags
Details
Formatted Diff
Diff
ThreadUsage enum
(13.90 KB, patch)
2011-09-09 18:38 PDT
,
Nat Duca
no flags
Details
Formatted Diff
Diff
Make it work, plus tests.
(15.70 KB, patch)
2011-09-09 23:46 PDT
,
Nat Duca
kbr
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Nat Duca
Comment 1
2011-09-08 21:22:17 PDT
Created
attachment 106838
[details]
Patch
Iain Merrick
Comment 2
2011-09-09 03:40:20 PDT
Very nice overall.
> Source/WebKit/chromium/src/GraphicsContext3DPrivate.h:60 > + // Used to create a GraphicsContext3D for use on a thread. Will skip making
Super picky: this first sentence is actually less useful than the name of the method. Maybe ditch it, but add a comment to create() to emphasise that the new context must be used on *this* thread?
Nat Duca
Comment 3
2011-09-09 08:50:55 PDT
Created
attachment 106877
[details]
now with comments.
Kenneth Russell
Comment 4
2011-09-09 18:22:23 PDT
Comment on
attachment 106877
[details]
now with comments. View in context:
https://bugs.webkit.org/attachment.cgi?id=106877&action=review
Overall this looks good but one small thing needs cleanup before landing.
> Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp:122 > +PassRefPtr<GraphicsContext3D> GraphicsContext3DPrivate::createGraphicsContextFromWebContext(PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle, bool forUseOnAnotherThread)
WebKit style strongly discourages the use of bool arguments because they aren't self-describing at the call site. Please define a little enum in GraphicsContext3DPrivate.h like ThreadUsage { ForUseOnThisThread, ForUseOnAnotherThread } and pass that instead.
Kenneth Russell
Comment 5
2011-09-09 18:28:51 PDT
Comment on
attachment 106877
[details]
now with comments. View in context:
https://bugs.webkit.org/attachment.cgi?id=106877&action=review
> Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp:165 > + return GraphicsContext3DPrivate::createGraphicsContextFromWebContext(webContext.release(), attrs, hostWindow, renderStyle, false);
Did you mean to pass "forUseOnAnotherThread" instead of "false" here? That would be yet another reason to use an enum.
Nat Duca
Comment 6
2011-09-09 18:38:35 PDT
Created
attachment 106950
[details]
ThreadUsage enum
Kenneth Russell
Comment 7
2011-09-09 18:56:25 PDT
Comment on
attachment 106950
[details]
ThreadUsage enum View in context:
https://bugs.webkit.org/attachment.cgi?id=106950&action=review
Thanks, looks good but does this actually compile?
> Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp:1026 > + return createGraphicsContext(attrs, hostWindow, renderStyle, ForUseOnThisThread);
Does this compile or do you need to say GraphicsContext3DPrivate::ForUseOnThisThread?
> Source/WebKit/chromium/tests/MockGraphicsContext3DTest.cpp:56 > + RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FrameCountingContext()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, false);
Does this compile?
> Source/WebKit/chromium/tests/MockGraphicsContext3DTest.cpp:78 > + RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new GMockContext()), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, false);
Same question here and below.
WebKit Review Bot
Comment 8
2011-09-09 19:53:51 PDT
Comment on
attachment 106950
[details]
ThreadUsage enum
Attachment 106950
[details]
did not pass cr-mac-ews (chromium): Output:
http://queues.webkit.org/results/9625903
Nat Duca
Comment 9
2011-09-09 23:46:10 PDT
Created
attachment 106968
[details]
Make it work, plus tests.
Kenneth Russell
Comment 10
2011-09-10 14:15:11 PDT
Comment on
attachment 106968
[details]
Make it work, plus tests. Fantastic. r=me
Nat Duca
Comment 11
2011-09-12 12:52:49 PDT
Committed
r94971
: <
http://trac.webkit.org/changeset/94971
>
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