WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
42203
[chromium] GLES2Context is in platform/ and shouldn't depend on Page
https://bugs.webkit.org/show_bug.cgi?id=42203
Summary
[chromium] GLES2Context is in platform/ and shouldn't depend on Page
James Robinson
Reported
2010-07-13 14:43:49 PDT
[chromium] GLES2Context is in platform/ and shouldn't depend on Page
Attachments
Patch
(16.87 KB, patch)
2010-07-13 16:25 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(23.42 KB, patch)
2010-07-14 16:11 PDT
,
James Robinson
fishd
: review+
fishd
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
James Robinson
Comment 1
2010-07-13 16:25:25 PDT
Created
attachment 61428
[details]
Patch
James Robinson
Comment 2
2010-07-13 18:50:07 PDT
My plan for creating GLES2Contexts from WebCore is to have two functions on ChromeClient: // Returns a GLES2Context used for rendering directly to the screen PassOwnPtr<GLES2Context> getOnscreenGLES2Context(); // Returns a GLES2Context for rendering offscreen that is capable of sharing // resources with the compositor's context PassOwnPtr<GLES2Context> getOffscreenGLES2Context(); The lifetime of GLES2Contexts is still kind of awkward. Making two calls to getOnscreenGLES2Context() will return two OwnPtr<>s that each wrap the same underlying object, but deleting a GLES2Context does not destroy the actual underlying object. Calling GLES2Context::destroy() does do something destructive. I think it's still valid to have this be an OwnPtr<> to make sure we don't leak the wrapper object (which I believe we do currently). I can post that as a followup or as a separate patch. Adding stuff to ChromeClient involves a loooot of plumbing so it's a rather noisy patch.
James Robinson
Comment 3
2010-07-14 16:11:08 PDT
Created
attachment 61581
[details]
Patch
James Robinson
Comment 4
2010-07-14 16:16:54 PDT
This patch adds in the onscreen/offscreen getters to ChromeClientChromium. They are currently uncalled, but that won't be true for long. One unfortunate thing is that this exposes two types of WebCore::GLES2Context's - those that own their underlying WebKit::WebGLES2Context and those that don't. When getting the GLES2Context for compositing, the caller doesn't want to have ownership. When getting an offscreen context the caller does want ownership. I added a flag to the GLES2ContextInternal constructor to allow for both kinds but it's kind of ugly. We don't need the ChromeClientChromium::getOnscreenGLES2Context() function yet so we could delete it for now and figure it out later.
Darin Fisher (:fishd, Google)
Comment 5
2010-07-14 16:52:54 PDT
Comment on
attachment 61581
[details]
Patch WebKit/chromium/public/WebGLES2Context.h:49 + WEBKIT_API virtual bool initialize(WebView*, WebGLES2Context* parent) = 0; no need for WEBKIT_API on virtual methods. no need to export these from WebKit when it is built as a DLL. WebKit/chromium/src/GLES2ContextInternal.h:55 + } } // namespace WebCore WebKit/chromium/src/WebViewImpl.cpp:2139 + return WebCore::GLES2Context::create(WebCore::GLES2ContextInternal::create(gles2Context(), false)); no need for the WebCore:: prefix in this .cpp file given the using declaration at the top of the file. WebKit/chromium/src/WebViewImpl.cpp:2142 + PassOwnPtr<WebCore::GLES2Context> WebViewImpl::getOffscreenGLES2Context() ditto about the WebCore:: prefix otherwise, R=me with these nits addressed.
James Robinson
Comment 6
2010-07-14 17:36:52 PDT
Committed
r63383
: <
http://trac.webkit.org/changeset/63383
>
WebKit Review Bot
Comment 7
2010-07-14 19:21:05 PDT
http://trac.webkit.org/changeset/63383
might have broken Chromium Mac Release The following changes are on the blame list:
http://trac.webkit.org/changeset/63384
http://trac.webkit.org/changeset/63385
http://trac.webkit.org/changeset/63386
http://trac.webkit.org/changeset/63389
http://trac.webkit.org/changeset/63383
James Robinson
Comment 8
2010-07-14 19:27:12 PDT
Fixed the compile error in
http://trac.webkit.org/changeset/63392
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