WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
41828
[chromium] Allow resizing an offscreen GLES2Context's backing store and getting its texture ID for compositing
https://bugs.webkit.org/show_bug.cgi?id=41828
Summary
[chromium] Allow resizing an offscreen GLES2Context's backing store and getti...
James Robinson
Reported
2010-07-07 19:38:50 PDT
[chromium] Allow resizing an offscreen GLES2Context's backing store and getting its texture ID for compositing
Attachments
Patch
(4.20 KB, patch)
2010-07-07 20:02 PDT
,
James Robinson
no flags
Details
Formatted Diff
Diff
Patch
(4.68 KB, patch)
2010-07-08 14:24 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-07 20:02:24 PDT
Created
attachment 60829
[details]
Patch
James Robinson
Comment 2
2010-07-07 20:45:51 PDT
Ken, Darin - mind taking a look? I added an ASSERT(webContext) rather than returning a bool since currently there is no good way for a caller to handle a failure and because getOffscreenContentParentTextureId naturally returns an unsigned.
Darin Fisher (:fishd, Google)
Comment 3
2010-07-07 23:08:50 PDT
Comment on
attachment 60829
[details]
Patch WebCore/platform/chromium/GLES2Context.h:65 + unsigned getOffscreenContentParentTextureId(); i like this name for this method. it helps me understand its distinction better. WebCore/platform/chromium/GLES2Context.h:62 + void resizeOffscreenContent(const IntSize& size); nit: webkit style is to leave off parameter names that do not add information. "size" is redundant with "IntSize" WebCore/platform/chromium/GLES2Context.h:63 + // Returns the ID of the texture used for offscreen rendering in the context of the parent. nit: a new line above this comment block would be nice for readability. WebKit/chromium/public/WebGLES2Context.h:52 + virtual void resizeOffscreenContent(int width, int height) = 0; nit: use WebSize in the WebKit API. WebKit/chromium/public/WebGLES2Context.h:53 + virtual unsigned getOffscreenContentParentTextureId() = 0; how about documenting these methods like you did for GLES2Context.h? it is important to document the WebKit API methods since that helps make the contract with the embedder clearer. WebKit/chromium/src/GLES2Context.cpp:148 + webContext->resizeOffscreenContent(size.width(), size.height()); WebSize can be constructed implicitly from IntSize :) otherwise, LGTM based on this being a faithful interpretation of what kbr wrote on the whiteboard earlier today :-)
James Robinson
Comment 4
2010-07-08 14:24:47 PDT
Created
attachment 60959
[details]
Patch
Kenneth Russell
Comment 5
2010-07-08 14:49:40 PDT
Comment on
attachment 60959
[details]
Patch Looks good to me. As in earlier Chromium review, uint32_t may be a better return type for getOffscreenContentParentTextureId().
Darin Fisher (:fishd, Google)
Comment 6
2010-07-08 16:31:15 PDT
Comment on
attachment 60959
[details]
Patch WebKit/chromium/public/WebGLES2Context.h:54
> + // The follow two functions are for managing a context that renders offscreen.
nit: put a new line after this comment so that it doesn't look like this comment is only talking about the first function? how critical is the unsigned vs uint32_t distinction? in the webkit api, we don't really have a uint32_t. (well, we do have one inherited from npruntime.h, but it would be odd to use that in this context.) anyways, r=me modulo the nit above.
James Robinson
Comment 7
2010-07-08 16:34:48 PDT
I don't think uint32_t vs unsigned will be an issue. If on some crazy moon system 'unsigned' was 64 bits things would still work fine since an unsigned would be able to represent the contents of a uint32_t without issue. We're using 'unsigned' for the GLuint type for texture IDs and other things elsewhere in WebKit code so I'd rather stick to that.
Kenneth Russell
Comment 8
2010-07-08 16:44:50 PDT
(In reply to
comment #7
)
> I don't think uint32_t vs unsigned will be an issue. If on some crazy moon system 'unsigned' was 64 bits things would still work fine since an unsigned would be able to represent the contents of a uint32_t without issue. We're using 'unsigned' for the GLuint type for texture IDs and other things elsewhere in WebKit code so I'd rather stick to that.
OK, sounds fine.
James Robinson
Comment 9
2010-07-08 17:41:28 PDT
Committed
r62874
: <
http://trac.webkit.org/changeset/62874
>
James Robinson
Comment 10
2010-07-08 17:41:54 PDT
Thanks for the review. Adjusted the space on the comments and landed.
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