WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98501
[Qt] Implement GraphicsSurfaceToken to replace uint64_t as token type.
https://bugs.webkit.org/show_bug.cgi?id=98501
Summary
[Qt] Implement GraphicsSurfaceToken to replace uint64_t as token type.
Zeno Albisser
Reported
2012-10-05 02:17:04 PDT
Up to now, we were using a uint64_t as a token to identify a GraphicsSurface. For mac and linux this seemed to be straight forward and good enough, even though not perfectly well designed. With the upcomping GraphicsSurface implementation for Windows, 64bit will not be sufficient for a token. A token will have to contain two native HANDLES which are of type (void*). On a 64bit build we would then need 128bits. We should therefore wrap any kind of native handles/windowid/IOSurfaceRef into a specific GraphicsSurfaceToken class.
Attachments
patch for review.
(36.12 KB, patch)
2012-10-05 03:04 PDT
,
Zeno Albisser
no flags
Details
Formatted Diff
Diff
patch for review. - rebased.
(36.17 KB, patch)
2012-10-05 04:46 PDT
,
Zeno Albisser
gtk-ews
: commit-queue-
Details
Formatted Diff
Diff
patch for review. - fixed compilation without use_graphics_surface.
(36.81 KB, patch)
2012-10-05 06:53 PDT
,
Zeno Albisser
zeno
: review-
zeno
: commit-queue-
Details
Formatted Diff
Diff
patch for review.
(36.86 KB, patch)
2012-10-05 08:21 PDT
,
Zeno Albisser
no flags
Details
Formatted Diff
Diff
patch for review.
(36.81 KB, patch)
2012-10-05 10:30 PDT
,
Zeno Albisser
noam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Zeno Albisser
Comment 1
2012-10-05 03:04:15 PDT
Created
attachment 167294
[details]
patch for review.
Zeno Albisser
Comment 2
2012-10-05 04:46:42 PDT
Created
attachment 167306
[details]
patch for review. - rebased.
kov's GTK+ EWS bot
Comment 3
2012-10-05 04:59:17 PDT
Comment on
attachment 167306
[details]
patch for review. - rebased.
Attachment 167306
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/14178454
Early Warning System Bot
Comment 4
2012-10-05 05:20:40 PDT
Comment on
attachment 167306
[details]
patch for review. - rebased.
Attachment 167306
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/14169743
Zeno Albisser
Comment 5
2012-10-05 06:53:02 PDT
Created
attachment 167320
[details]
patch for review. - fixed compilation without use_graphics_surface.
Zeno Albisser
Comment 6
2012-10-05 07:22:27 PDT
Comment on
attachment 167320
[details]
patch for review. - fixed compilation without use_graphics_surface. This patch will need another iteration. - I'll post an update asap.
Zeno Albisser
Comment 7
2012-10-05 08:21:54 PDT
Created
attachment 167331
[details]
patch for review.
Kenneth Rohde Christiansen
Comment 8
2012-10-05 08:54:25 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
> Source/WebCore/ChangeLog:7 > + This is necessary in order to implement GraphicsSurface for Windows as well.
I would remove "as well"
> Source/WebCore/ChangeLog:9 > + WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in future two HANDLEs (Windows).
in *the* future
> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 > +#if OS(LINUX) > + GraphicsSurfaceToken(uint32_t windowID = 0) > + : frontBufferHandle(windowID) > + { }
So this covers linux without X11?
Pierre Rossi
Comment 9
2012-10-05 09:14:31 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>> Source/WebCore/ChangeLog:9 >> + WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in future two HANDLEs (Windows). > > in *the* future
I would tend to agree, but it seems it could actually be correct according to that:
http://itre.cis.upenn.edu/~myl/languagelog/archives/004201.html
Well, I'd be more comfortable with a comma before and after. Maybe it's just us not being accustomed to british english that much...
Zeno Albisser
Comment 10
2012-10-05 09:30:02 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>> Source/WebCore/ChangeLog:7 >> + This is necessary in order to implement GraphicsSurface for Windows as well. > > I would remove "as well"
I can change that.
>>> Source/WebCore/ChangeLog:9 >>> + WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in future two HANDLEs (Windows). >> >> in *the* future > > I would tend to agree, but it seems it could actually be correct according to that:
http://itre.cis.upenn.edu/~myl/languagelog/archives/004201.html
> Well, I'd be more comfortable with a comma before and after. > Maybe it's just us not being accustomed to british english that much...
And I can change that as well.
>> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 >> + { } > > So this covers linux without X11?
Linux without GLX/X11 will not use GRAPHICS_SURFACE in the first place. So it's not an issue.
Kenneth Rohde Christiansen
Comment 11
2012-10-05 09:33:16 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>>> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 >>> + { } >> >> So this covers linux without X11? > > Linux without GLX/X11 will not use GRAPHICS_SURFACE in the first place. So it's not an issue.
Well adding a has X11 to the ifdef would make that more clear. So how will this be done for EGL?
Zeno Albisser
Comment 12
2012-10-05 09:40:49 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>>>> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 >>>> + { } >>> >>> So this covers linux without X11? >> >> Linux without GLX/X11 will not use GRAPHICS_SURFACE in the first place. So it's not an issue. > > Well adding a has X11 to the ifdef would make that more clear. So how will this be done for EGL?
Isn't that something we should worry about, once we are implementing a GraphicsSurface for EGL? I mean, it could be that a single uint32_t is perfectly viable for that case. Or it could be that we need two uint32_t to identify a front and a back buffer, as it is necessary for Mac. Or it could also be that we even need two uint64_t as we will need on Windows (ANGLE/EGL). But I do not think it makes sense to try predicting all that before even prototyping such a solution for EGL. Let's take a step at the time.
Noam Rosenthal
Comment 13
2012-10-05 09:46:00 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>>>>> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 >>>>> + { } >>>> >>>> So this covers linux without X11? >>> >>> Linux without GLX/X11 will not use GRAPHICS_SURFACE in the first place. So it's not an issue. >> >> Well adding a has X11 to the ifdef would make that more clear. So how will this be done for EGL? > > Isn't that something we should worry about, once we are implementing a GraphicsSurface for EGL? I mean, it could be that a single uint32_t is perfectly viable for that case. Or it could be that we need two uint32_t to identify a front and a back buffer, as it is necessary for Mac. Or it could also be that we even need two uint64_t as we will need on Windows (ANGLE/EGL). > But I do not think it makes sense to try predicting all that before even prototyping such a solution for EGL. Let's take a step at the time.
Still, HAVE(GLX) instead of OS(LINUX) makes this more readable and I fail to see the argument against that.
Zeno Albisser
Comment 14
2012-10-05 09:54:25 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
>>>>>> Source/WebCore/platform/graphics/surfaces/GraphicsSurfaceToken.h:41 >>>>>> + { } >>>>> >>>>> So this covers linux without X11? >>>> >>>> Linux without GLX/X11 will not use GRAPHICS_SURFACE in the first place. So it's not an issue. >>> >>> Well adding a has X11 to the ifdef would make that more clear. So how will this be done for EGL? >> >> Isn't that something we should worry about, once we are implementing a GraphicsSurface for EGL? I mean, it could be that a single uint32_t is perfectly viable for that case. Or it could be that we need two uint32_t to identify a front and a back buffer, as it is necessary for Mac. Or it could also be that we even need two uint64_t as we will need on Windows (ANGLE/EGL). >> But I do not think it makes sense to try predicting all that before even prototyping such a solution for EGL. Let's take a step at the time. > > Still, HAVE(GLX) instead of OS(LINUX) makes this more readable and I fail to see the argument against that.
How about context? - We distinguish between DARWIN and GLX? I think it is more readable to distinguish between DARWIN and LINUX. Also i think it is not necessary to forcefully disable a code path that we do not even know yet, if it is going to be wrong for EGL. But I am not going to argue too hard about it, it is just a single line after all. - So I will change it. Anything else?
Noam Rosenthal
Comment 15
2012-10-05 09:58:47 PDT
Comment on
attachment 167331
[details]
patch for review. View in context:
https://bugs.webkit.org/attachment.cgi?id=167331&action=review
Some nitpicks... otherwise all good :)
> Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp:37 > +void TextureMapperSurfaceBackingStore::setGraphicsSurface(GraphicsSurfaceToken graphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer)
const &?
> Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h:53 > + void setGraphicsSurface(GraphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer);
const &?
Zeno Albisser
Comment 16
2012-10-05 10:30:07 PDT
Created
attachment 167345
[details]
patch for review.
Zeno Albisser
Comment 17
2012-10-11 02:53:48 PDT
Committed
r131036
: <
http://trac.webkit.org/changeset/131036
>
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