Remove ContentClientRemote. (bug 1409871 part 1, r=nical)

This class doesn't seem to be necessary and only complicates the class
hierarchy.

MozReview-Commit-ID: 6dRXce1vB9T
This commit is contained in:
Ryan Hunt
2017-10-11 12:43:39 -04:00
parent da679788c8
commit 8348724cb0
4 changed files with 9 additions and 30 deletions

View File

@@ -81,8 +81,8 @@ ClientPaintedLayer::UpdateContentClient(PaintState& aState)
AddToValidRegion(aState.mRegionToDraw); AddToValidRegion(aState.mRegionToDraw);
ContentClientRemote *contentClientRemote = ContentClientRemoteBuffer *contentClientRemote =
static_cast<ContentClientRemote *>(mContentClient.get()); static_cast<ContentClientRemoteBuffer *>(mContentClient.get());
MOZ_ASSERT(contentClientRemote->GetIPCHandle()); MOZ_ASSERT(contentClientRemote->GetIPCHandle());
// Hold(this) ensures this layer is kept alive through the current transaction // Hold(this) ensures this layer is kept alive through the current transaction

View File

@@ -26,7 +26,7 @@ class ImageContainer;
class CompositableForwarder; class CompositableForwarder;
class CompositableChild; class CompositableChild;
class TextureClientRecycleAllocator; class TextureClientRecycleAllocator;
class ContentClientRemote; class ContentClientRemoteBuffer;
/** /**
* CompositableClient manages the texture-specific logic for composite layers, * CompositableClient manages the texture-specific logic for composite layers,
@@ -165,8 +165,6 @@ public:
*/ */
virtual void RemoveTexture(TextureClient* aTexture); virtual void RemoveTexture(TextureClient* aTexture);
virtual ContentClientRemote* AsContentClientRemote() { return nullptr; }
void InitIPDL(const CompositableHandle& aHandle); void InitIPDL(const CompositableHandle& aHandle);
TextureFlags GetTextureFlags() const { return mTextureFlags; } TextureFlags GetTextureFlags() const { return mTextureFlags; }

View File

@@ -298,7 +298,7 @@ ContentClientRemoteBuffer::EndPaint(nsTArray<ReadbackProcessor::Update>* aReadba
mTextureClientOnWhite->SyncWithObject(mForwarder->GetSyncObject()); mTextureClientOnWhite->SyncWithObject(mForwarder->GetSyncObject());
} }
ContentClientRemote::EndPaint(aReadbackUpdates); ContentClient::EndPaint(aReadbackUpdates);
} }
void void

View File

@@ -115,25 +115,6 @@ protected:
bool mInAsyncPaint; bool mInAsyncPaint;
}; };
/**
* A ContentClient for use with OMTC.
*/
class ContentClientRemote : public ContentClient
{
public:
explicit ContentClientRemote(CompositableForwarder* aForwarder)
: ContentClient(aForwarder)
{}
virtual void Updated(const nsIntRegion& aRegionToDraw,
const nsIntRegion& aVisibleRegion,
bool aDidSelfCopy) = 0;
ContentClientRemote* AsContentClientRemote() override {
return this;
}
};
// thin wrapper around RotatedContentBuffer, for on-mtc // thin wrapper around RotatedContentBuffer, for on-mtc
class ContentClientBasic final : public ContentClient class ContentClientBasic final : public ContentClient
, protected RotatedContentBuffer , protected RotatedContentBuffer
@@ -187,9 +168,9 @@ private:
}; };
/** /**
* A ContentClientRemote backed by a RotatedContentBuffer. * A ContentClient backed by a RotatedContentBuffer.
* *
* When using a ContentClientRemote, SurfaceDescriptors are created on * When using a ContentClientRemoteBuffer, SurfaceDescriptors are created on
* the rendering side and destroyed on the compositing side. They are only * the rendering side and destroyed on the compositing side. They are only
* passed from one side to the other when the TextureClient/Hosts are created. * passed from one side to the other when the TextureClient/Hosts are created.
* *Ownership* of the SurfaceDescriptor moves from the rendering side to the * *Ownership* of the SurfaceDescriptor moves from the rendering side to the
@@ -202,14 +183,14 @@ private:
* create them. * create them.
*/ */
// Version using new texture clients // Version using new texture clients
class ContentClientRemoteBuffer : public ContentClientRemote class ContentClientRemoteBuffer : public ContentClient
, protected RotatedContentBuffer , protected RotatedContentBuffer
{ {
using RotatedContentBuffer::BufferRect; using RotatedContentBuffer::BufferRect;
using RotatedContentBuffer::BufferRotation; using RotatedContentBuffer::BufferRotation;
public: public:
explicit ContentClientRemoteBuffer(CompositableForwarder* aForwarder) explicit ContentClientRemoteBuffer(CompositableForwarder* aForwarder)
: ContentClientRemote(aForwarder) : ContentClient(aForwarder)
, RotatedContentBuffer(ContainsVisibleBounds) , RotatedContentBuffer(ContainsVisibleBounds)
, mIsNewBuffer(false) , mIsNewBuffer(false)
, mFrontAndBackBufferDiffer(false) , mFrontAndBackBufferDiffer(false)
@@ -263,7 +244,7 @@ public:
virtual void Updated(const nsIntRegion& aRegionToDraw, virtual void Updated(const nsIntRegion& aRegionToDraw,
const nsIntRegion& aVisibleRegion, const nsIntRegion& aVisibleRegion,
bool aDidSelfCopy) override; bool aDidSelfCopy);
virtual void SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) override; virtual void SwapBuffers(const nsIntRegion& aFrontUpdatedRegion) override;