WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
89667
[chromium] Use CCScopedTexture for video layers and YUV video quads
https://bugs.webkit.org/show_bug.cgi?id=89667
Summary
[chromium] Use CCScopedTexture for video layers and YUV video quads
Dana Jansens
Reported
2012-06-21 08:41:56 PDT
[chromium] Use CCScopedTexture for video layers and YUV video quads
Attachments
Patch
(16.15 KB, patch)
2012-06-21 08:45 PDT
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-06-21 08:43:28 PDT
Here's a practical example of using CCScopedTexture in practice. I replaced the textureId/size/format from CCVideoLayerImpl with a CCScopedTexture. It allows us to create/free the texture without using a TextureAllocator, and makes the ownership and freeing semantics simpler IMO.
Dana Jansens
Comment 2
2012-06-21 08:45:50 PDT
Created
attachment 148811
[details]
Patch
Adrienne Walker
Comment 3
2012-06-21 09:27:43 PDT
Comment on
attachment 148811
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148811&action=review
> Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h:72 > + CCScopedTexture texture;
So now CCYUVDrawQuad has a RefPtr<GraphicsContext3D>?
Dana Jansens
Comment 4
2012-06-21 09:39:24 PDT
Comment on
attachment 148811
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148811&action=review
>> Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h:72 >> + CCScopedTexture texture; > > So now CCYUVDrawQuad has a RefPtr<GraphicsContext3D>?
ahhh that's true, not good.
Dana Jansens
Comment 5
2012-06-21 10:03:49 PDT
(In reply to
comment #4
)
> (From update of
attachment 148811
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=148811&action=review
> > >> Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h:72 > >> + CCScopedTexture texture; > > > > So now CCYUVDrawQuad has a RefPtr<GraphicsContext3D>? > > ahhh that's true, not good.
It would actually always be null, since this is a cloned copy of the texture and doesn't own the id. But yah.
Eric Penner
Comment 6
2012-06-21 11:46:07 PDT
Comment on
attachment 148811
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148811&action=review
> Source/WebCore/platform/graphics/chromium/cc/CCScopedTexture.h:54 > + void cloneFrom(const CCScopedTexture&);
If there isn't two owners, couldn't this return the id? It seems like all the safety of the own pointer is gone in the cloned pointer anyway.
Eric Penner
Comment 7
2012-06-21 11:53:02 PDT
Comment on
attachment 148811
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=148811&action=review
>> Source/WebCore/platform/graphics/chromium/cc/CCScopedTexture.h:54 >> + void cloneFrom(const CCScopedTexture&); > > If there isn't two owners, couldn't this return the id? It seems like all the safety of the own pointer is gone in the cloned pointer anyway.
Oh, I think I get the purpose now. You want to keep the size/format etc. in the new object. Maybe there should just be a super basic class that contains these things together. Or even just a struct that we use universally everywhere (like the TextureInfo struct from the original TextureManager).
Alexandre Elias
Comment 8
2012-06-21 12:04:49 PDT
Agreed cloneFrom is a bad idea. If introducing a new TextureInfo struct is enough to solve your problem, note that it would also let us replace the "maybeBytes()" method with a clearer method TextureInfo::bytes().
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