mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1011569 - Remove PreferMemoryOverShmem in favour of IsSameProcess. r=nical
This commit is contained in:
parent
41c19b8630
commit
eeff5cfb5a
@ -325,7 +325,7 @@ TextureClient::CreateBufferTextureClient(ISurfaceAllocator* aAllocator,
|
|||||||
TextureFlags aTextureFlags,
|
TextureFlags aTextureFlags,
|
||||||
gfx::BackendType aMoz2DBackend)
|
gfx::BackendType aMoz2DBackend)
|
||||||
{
|
{
|
||||||
if (gfxPlatform::GetPlatform()->PreferMemoryOverShmem()) {
|
if (aAllocator->IsSameProcess()) {
|
||||||
RefPtr<BufferTextureClient> result = new MemoryTextureClient(aAllocator, aFormat,
|
RefPtr<BufferTextureClient> result = new MemoryTextureClient(aAllocator, aFormat,
|
||||||
aMoz2DBackend,
|
aMoz2DBackend,
|
||||||
aTextureFlags);
|
aTextureFlags);
|
||||||
|
@ -527,7 +527,7 @@ TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion, TextureClientPool *aP
|
|||||||
}
|
}
|
||||||
mBackBuffer = aPool->GetTextureClient();
|
mBackBuffer = aPool->GetTextureClient();
|
||||||
// Create a lock for our newly created back-buffer.
|
// Create a lock for our newly created back-buffer.
|
||||||
if (gfxPlatform::GetPlatform()->PreferMemoryOverShmem()) {
|
if (mManager->AsShadowForwarder()->IsSameProcess()) {
|
||||||
// If our compositor is in the same process, we can save some cycles by not
|
// If our compositor is in the same process, we can save some cycles by not
|
||||||
// using shared memory.
|
// using shared memory.
|
||||||
mBackLock = new gfxMemorySharedReadLock();
|
mBackLock = new gfxMemorySharedReadLock();
|
||||||
|
@ -111,7 +111,7 @@ ISurfaceAllocator::AllocSurfaceDescriptorWithCaps(const gfx::IntSize& aSize,
|
|||||||
gfx::SurfaceFormat format =
|
gfx::SurfaceFormat format =
|
||||||
gfxPlatform::GetPlatform()->Optimal2DFormatForContent(aContent);
|
gfxPlatform::GetPlatform()->Optimal2DFormatForContent(aContent);
|
||||||
size_t size = ImageDataSerializer::ComputeMinBufferSize(aSize, format);
|
size_t size = ImageDataSerializer::ComputeMinBufferSize(aSize, format);
|
||||||
if (gfxPlatform::GetPlatform()->PreferMemoryOverShmem()) {
|
if (IsSameProcess()) {
|
||||||
uint8_t *data = new (std::nothrow) uint8_t[size];
|
uint8_t *data = new (std::nothrow) uint8_t[size];
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -272,8 +272,6 @@ gfxPlatform::gfxPlatform()
|
|||||||
mOpenTypeSVGEnabled = UNINITIALIZED_VALUE;
|
mOpenTypeSVGEnabled = UNINITIALIZED_VALUE;
|
||||||
mBidiNumeralOption = UNINITIALIZED_VALUE;
|
mBidiNumeralOption = UNINITIALIZED_VALUE;
|
||||||
|
|
||||||
mLayersPreferMemoryOverShmem = XRE_GetProcessType() == GeckoProcessType_Default;
|
|
||||||
|
|
||||||
mSkiaGlue = nullptr;
|
mSkiaGlue = nullptr;
|
||||||
|
|
||||||
uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO) | BackendTypeBit(BackendType::SKIA);
|
uint32_t canvasMask = BackendTypeBit(BackendType::CAIRO) | BackendTypeBit(BackendType::SKIA);
|
||||||
@ -534,12 +532,6 @@ gfxPlatform::~gfxPlatform()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
gfxPlatform::PreferMemoryOverShmem() const {
|
|
||||||
MOZ_ASSERT(!CompositorParent::IsInCompositorThread());
|
|
||||||
return mLayersPreferMemoryOverShmem;
|
|
||||||
}
|
|
||||||
|
|
||||||
cairo_user_data_key_t kDrawTarget;
|
cairo_user_data_key_t kDrawTarget;
|
||||||
|
|
||||||
RefPtr<DrawTarget>
|
RefPtr<DrawTarget>
|
||||||
|
@ -541,14 +541,6 @@ public:
|
|||||||
return nsIntRect(0, 0, bits * sizeOfBit, sizeOfBit);
|
return nsIntRect(0, 0, bits * sizeOfBit, sizeOfBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if we should use raw memory to send data to the compositor
|
|
||||||
* rather than using shmems.
|
|
||||||
*
|
|
||||||
* This method should not be called from the compositor thread.
|
|
||||||
*/
|
|
||||||
bool PreferMemoryOverShmem() const;
|
|
||||||
|
|
||||||
mozilla::gl::SkiaGLGlue* GetSkiaGLGlue();
|
mozilla::gl::SkiaGLGlue* GetSkiaGLGlue();
|
||||||
void PurgeSkiaCache();
|
void PurgeSkiaCache();
|
||||||
|
|
||||||
@ -661,7 +653,6 @@ private:
|
|||||||
mozilla::widget::GfxInfoCollector<gfxPlatform> mAzureCanvasBackendCollector;
|
mozilla::widget::GfxInfoCollector<gfxPlatform> mAzureCanvasBackendCollector;
|
||||||
|
|
||||||
mozilla::RefPtr<mozilla::gfx::DrawEventRecorder> mRecorder;
|
mozilla::RefPtr<mozilla::gfx::DrawEventRecorder> mRecorder;
|
||||||
bool mLayersPreferMemoryOverShmem;
|
|
||||||
mozilla::RefPtr<mozilla::gl::SkiaGLGlue> mSkiaGlue;
|
mozilla::RefPtr<mozilla::gl::SkiaGLGlue> mSkiaGlue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user