Bug 67179 - [chromium] Allow GraphicsContexts to be created from MockWebGraphicsContexts
Summary: [chromium] Allow GraphicsContexts to be created from MockWebGraphicsContexts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nat Duca
URL:
Keywords:
Depends on: 67172
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-29 22:26 PDT by Nat Duca
Modified: 2011-08-31 07:34 PDT (History)
3 users (show)

See Also:


Attachments
Patch (16.02 KB, patch)
2011-08-29 22:26 PDT, Nat Duca
no flags Details | Formatted Diff | Diff
Patch for landing (15.90 KB, patch)
2011-08-30 12:28 PDT, Nat Duca
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Duca 2011-08-29 22:26:12 PDT
[chromium] Allow GraphicsContexts to be created from MockWebGraphicsContexts
Comment 1 Nat Duca 2011-08-29 22:26:32 PDT
Created attachment 105579 [details]
Patch
Comment 2 Nat Duca 2011-08-29 22:34:33 PDT
@kbr, I'd love any feedback you have on the overall structure here. I'm absolutely fine trying a totally different approach than this --- I just took a stab in the dark at this one.
Comment 3 Kenneth Russell 2011-08-30 10:08:33 PDT
Comment on attachment 105579 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=105579&action=review

Looks good overall. This one will have to be merged with the fix for https://bugs.webkit.org/show_bug.cgi?id=67172 which just landed. Couple of minor comments. I'll r+ this in case you want to fix the issues upon landing, or feel free to upload another version.

> Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp:120
> +PassRefPtr<GraphicsContext3D> GraphicsContext3DInternal::createFromWebContext(PassOwnPtr<WebKit::WebGraphicsContext3D> webContext, GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)

This is clearly the key method. I see that there's really no other place to put it (can't go in GC3D, because that can't reference our WebKit API). However could you perhaps name it something like createGraphicsContext3DFromWebContext to avoid confusion?

> Source/WebKit/chromium/src/GraphicsContext3DInternal.h:59
> +    static PassRefPtr<GraphicsContext3D> createFromWebContext(PassOwnPtr<WebKit::WebGraphicsContext3D>, GraphicsContext3D::Attributes, HostWindow*, GraphicsContext3D::RenderStyle);

Could you indicate that the createFromWebContext method (or whatever it ends up being called) is only for testing purposes?
Comment 4 Nat Duca 2011-08-30 12:28:48 PDT
Created attachment 105668 [details]
Patch for landing
Comment 5 WebKit Review Bot 2011-08-30 13:42:24 PDT
Comment on attachment 105668 [details]
Patch for landing

Clearing flags on attachment: 105668

Committed r94106: <http://trac.webkit.org/changeset/94106>
Comment 6 WebKit Review Bot 2011-08-30 13:42:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Alexander Pavlov (apavlov) 2011-08-31 07:34:04 PDT
The landed patch breaks at least gclient:
"Error: Missing input file src\third_party\WebKit\Source\WebKit\chromium\tests\MockGraphicsContext3D.h"
as it includes a new file 'tests/MockGraphicsContext3D.h' which is not added by the patch. I have filed bug 67288 to track this issue.