mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1281775
- Make dib textures not rely on accessing a ShadowLayerForwarder. r=gw280
This commit is contained in:
parent
93024c0a86
commit
f541fa5146
@ -281,7 +281,7 @@ DIBTextureData*
|
||||
ShmemDIBTextureData::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||
ClientIPCAllocator* aAllocator)
|
||||
{
|
||||
MOZ_ASSERT(aAllocator->AsLayerForwarder()->GetParentPid() != base::ProcessId());
|
||||
MOZ_ASSERT(aAllocator->GetParentPid() != base::ProcessId());
|
||||
|
||||
DWORD mapSize = aSize.width * aSize.height * BytesPerPixel(aFormat);
|
||||
HANDLE fileMapping = ::CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, mapSize, NULL);
|
||||
@ -343,7 +343,7 @@ ShmemDIBTextureData::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||
|
||||
HANDLE hostHandle = NULL;
|
||||
|
||||
if (!ipc::DuplicateHandle(fileMapping, aAllocator->AsLayerForwarder()->GetParentPid(),
|
||||
if (!ipc::DuplicateHandle(fileMapping, aAllocator->GetParentPid(),
|
||||
&hostHandle, 0, DUPLICATE_SAME_ACCESS)) {
|
||||
gfxCriticalError() << "Failed to duplicate handle to parent process for surface.";
|
||||
::DeleteObject(bitmap);
|
||||
|
@ -183,6 +183,8 @@ public:
|
||||
|
||||
virtual MessageLoop* GetMessageLoop() const override { return mMessageLoop; }
|
||||
|
||||
virtual base::ProcessId GetParentPid() const override { return OtherPid(); }
|
||||
|
||||
virtual bool AllocUnsafeShmem(size_t aSize,
|
||||
mozilla::ipc::SharedMemory::SharedMemoryType aShmType,
|
||||
mozilla::ipc::Shmem* aShmem) override;
|
||||
|
@ -127,6 +127,8 @@ public:
|
||||
|
||||
virtual ClientIPCAllocator* AsClientAllocator() override { return this; }
|
||||
|
||||
virtual base::ProcessId GetParentPid() const = 0;
|
||||
|
||||
virtual MessageLoop * GetMessageLoop() const = 0;
|
||||
|
||||
virtual int32_t GetMaxTextureSize() const { return gfxPrefs::MaxTextureSize(); }
|
||||
|
@ -189,6 +189,8 @@ public:
|
||||
*/
|
||||
virtual MessageLoop * GetMessageLoop() const override;
|
||||
|
||||
virtual base::ProcessId GetParentPid() const override { return OtherPid(); }
|
||||
|
||||
PCompositableChild* AllocPCompositableChild(const TextureInfo& aInfo,
|
||||
PImageContainerChild* aChild, uint64_t* aID) override;
|
||||
bool DeallocPCompositableChild(PCompositableChild* aActor) override;
|
||||
|
@ -356,7 +356,7 @@ public:
|
||||
|
||||
virtual void CancelWaitForRecycle(uint64_t aTextureId) override;
|
||||
|
||||
base::ProcessId GetParentPid() const;
|
||||
virtual base::ProcessId GetParentPid() const override;
|
||||
|
||||
/**
|
||||
* Construct a shadow of |aLayer| on the "other side", at the
|
||||
|
Loading…
Reference in New Issue
Block a user