Closed
Bug 1378297
Opened 7 years ago
Closed 7 years ago
Add DXGITextureHostD3D11::GetAsSurface() support for webrender wrench
Categories
(Core :: Graphics: WebRender, enhancement)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: sotaro, Assigned: sotaro)
Details
Attachments
(1 file, 3 obsolete files)
3.82 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
wrench requests TextureHost::GetAsSurface() support. It is necessary to implement DXGITextureHostD3D11::GetAsSurface() for webrender wrench.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8883483 -
Attachment is obsolete: true
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8883485 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8883486 -
Flags: review?(matt.woodrow)
Comment 4•7 years ago
|
||
Comment on attachment 8883486 [details] [diff] [review] patch - Add DXGITextureHostD3D11::GetAsSurface() support for webrender wrench Review of attachment 8883486 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/d3d11/TextureD3D11.cpp @@ +893,5 @@ > + RefPtr<IDXGIKeyedMutex> mutex; > + hr = mTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex)); > + > + if (SUCCEEDED(hr) && mutex) { > + hr = mutex->AcquireSync(0, 2000); Looks like you never release this again, please use AutoLockD3D11Texture instead. @@ +900,5 @@ > + } > + } > + > + context->CopyResource(cpuTexture, mTexture); > + if (!context) { We've already dereferenced context at this point, why are we checking it now? @@ +912,5 @@ > + } > + > + RefPtr<DataSourceSurface> surf = > + gfx::CreateDataSourceSurfaceFromData(IntSize(textureDesc.Width, textureDesc.Height), > + GetFormat(), I assume this only really works for RGB(A) data. Can we check the format to make sure it's not YUV or anything unexpected?
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #4) > Comment on attachment 8883486 [details] [diff] [review] > patch - Add DXGITextureHostD3D11::GetAsSurface() support for webrender wrench > > Review of attachment 8883486 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/layers/d3d11/TextureD3D11.cpp > @@ +893,5 @@ > > + RefPtr<IDXGIKeyedMutex> mutex; > > + hr = mTexture->QueryInterface((IDXGIKeyedMutex**)getter_AddRefs(mutex)); > > + > > + if (SUCCEEDED(hr) && mutex) { > > + hr = mutex->AcquireSync(0, 2000); > > Looks like you never release this again, please use AutoLockD3D11Texture > instead. Sorry, this part was not necessary KeyedMutex is already handled by LockD3DTexture() and UnlockD3DTexture() under AutoLockTextureHostWithoutCompositor. I am going to remove this part. > > @@ +900,5 @@ > > + } > > + } > > + > > + context->CopyResource(cpuTexture, mTexture); > > + if (!context) { > > We've already dereferenced context at this point, why are we checking it now? It seemed added by mistake:( I will remove it in a next patch. > > @@ +912,5 @@ > > + } > > + > > + RefPtr<DataSourceSurface> surf = > > + gfx::CreateDataSourceSurfaceFromData(IntSize(textureDesc.Width, textureDesc.Height), > > + GetFormat(), > > I assume this only really works for RGB(A) data. Can we check the format to > make sure it's not YUV or anything unexpected? I'll add it in a next patch.
Assignee | ||
Comment 6•7 years ago
|
||
Attachment #8883486 -
Attachment is obsolete: true
Attachment #8883486 -
Flags: review?(matt.woodrow)
Assignee | ||
Updated•7 years ago
|
Attachment #8883785 -
Flags: review?(matt.woodrow)
Updated•7 years ago
|
Attachment #8883785 -
Flags: review?(matt.woodrow) → review+
Assignee | ||
Comment 7•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0b3eeac47307d9a12195bf59f47b63ed0d4f2304
Pushed by sikeda@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d8da7d04200e Add DXGITextureHostD3D11::GetAsSurface() support for webrender wrench r=mattwoodrow
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d8da7d04200e
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•