Backed out changeset a8ff54e28b15 (bug 1088300) for unused variable error in SingleTiledContentClient.h. r=backout on a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2016-08-30 14:06:14 +02:00
Родитель db7d0332c4
Коммит 0aa16b8142
5 изменённых файлов: 89 добавлений и 61 удалений

Просмотреть файл

@ -445,10 +445,10 @@ ClientTiledPaintedLayer::RenderLayer()
if (!mContentClient) {
if (wantSingleTiledContentClient) {
mContentClient = new SingleTiledContentClient(*this, ClientManager());
mContentClient = new SingleTiledContentClient(this, ClientManager());
mHaveSingleTiledContentClient = true;
} else {
mContentClient = new MultiTiledContentClient(*this, ClientManager());
mContentClient = new MultiTiledContentClient(this, ClientManager());
mHaveSingleTiledContentClient = false;
}

Просмотреть файл

@ -11,13 +11,13 @@ namespace mozilla {
namespace layers {
SingleTiledContentClient::SingleTiledContentClient(ClientTiledPaintedLayer& aPaintedLayer,
SingleTiledContentClient::SingleTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
ClientLayerManager* aManager)
: TiledContentClient(aManager, "Single")
{
MOZ_COUNT_CTOR(SingleTiledContentClient);
mTiledBuffer = new ClientSingleTiledLayerBuffer(aPaintedLayer, *this, aManager);
mTiledBuffer = new ClientSingleTiledLayerBuffer(aPaintedLayer, this, aManager);
}
void
@ -41,8 +41,8 @@ SingleTiledContentClient::ClientSupportsLayerSize(const gfx::IntSize& aSize, Cli
return aSize.width <= maxTextureSize && aSize.height <= maxTextureSize;
}
ClientSingleTiledLayerBuffer::ClientSingleTiledLayerBuffer(ClientTiledPaintedLayer& aPaintedLayer,
CompositableClient& aCompositableClient,
ClientSingleTiledLayerBuffer::ClientSingleTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
CompositableClient* aCompositableClient,
ClientLayerManager* aManager)
: ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
, mManager(aManager)
@ -93,7 +93,7 @@ already_AddRefed<TextureClient>
ClientSingleTiledLayerBuffer::GetTextureClient()
{
MOZ_ASSERT(mFormat != gfx::SurfaceFormat::UNKNOWN);
return mCompositableClient.CreateTextureClientForDrawing(
return mCompositableClient->CreateTextureClientForDrawing(
gfx::ImageFormatToSurfaceFormat(mFormat), mSize, BackendSelector::Content,
TextureFlags::DISALLOW_BIGIMAGE | TextureFlags::IMMEDIATE_UPLOAD);
}
@ -125,8 +125,10 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
mFormat = gfxPlatform::GetPlatform()->OptimalFormatForContent(content);
if (mTile.IsPlaceholderTile()) {
mTile.SetLayerManager(mManager);
mTile.SetTextureAllocator(this);
}
mTile.SetCompositableClient(mCompositableClient);
// The dirty region relative to the top-left of the tile.
nsIntRegion tileDirtyRegion = paintRegion.MovedBy(-mTilingOrigin);
@ -134,8 +136,7 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
nsIntRegion extraPainted;
RefPtr<TextureClient> backBufferOnWhite;
RefPtr<TextureClient> backBuffer =
mTile.GetBackBuffer(mCompositableClient,
tileDirtyRegion,
mTile.GetBackBuffer(tileDirtyRegion,
content, mode,
extraPainted,
&backBufferOnWhite);
@ -184,7 +185,7 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
}
ctx->SetMatrix(ctx->CurrentMatrix().Translate(-mTilingOrigin.x, -mTilingOrigin.y));
aCallback(&mPaintedLayer, ctx, paintRegion, paintRegion, DrawRegionClip::DRAW, nsIntRegion(), aCallbackData);
aCallback(mPaintedLayer, ctx, paintRegion, paintRegion, DrawRegionClip::DRAW, nsIntRegion(), aCallbackData);
}
// Mark the area we just drew into the back buffer as invalid in the front buffer as they're

Просмотреть файл

@ -27,8 +27,8 @@ class ClientSingleTiledLayerBuffer
{
virtual ~ClientSingleTiledLayerBuffer() {}
public:
ClientSingleTiledLayerBuffer(ClientTiledPaintedLayer& aPaintedLayer,
CompositableClient& aCompositableClient,
ClientSingleTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
CompositableClient* aCompositableClient,
ClientLayerManager* aManager);
// TextureClientAllocator
@ -106,7 +106,7 @@ private:
class SingleTiledContentClient : public TiledContentClient
{
public:
SingleTiledContentClient(ClientTiledPaintedLayer& aPaintedLayer,
SingleTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
ClientLayerManager* aManager);
protected:

Просмотреть файл

@ -87,13 +87,17 @@ using namespace gfx;
namespace layers {
MultiTiledContentClient::MultiTiledContentClient(ClientTiledPaintedLayer& aPaintedLayer,
MultiTiledContentClient::MultiTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
ClientLayerManager* aManager)
: TiledContentClient(aManager, "Multi")
, mTiledBuffer(aPaintedLayer, *this, aManager, &mSharedFrameMetricsHelper)
, mLowPrecisionTiledBuffer(aPaintedLayer, *this, aManager, &mSharedFrameMetricsHelper)
{
MOZ_COUNT_CTOR(MultiTiledContentClient);
mTiledBuffer = ClientMultiTiledLayerBuffer(aPaintedLayer, this, aManager,
&mSharedFrameMetricsHelper);
mLowPrecisionTiledBuffer = ClientMultiTiledLayerBuffer(aPaintedLayer, this, aManager,
&mSharedFrameMetricsHelper);
mLowPrecisionTiledBuffer.SetResolution(gfxPrefs::LowPrecisionResolution());
mHasLowPrecision = gfxPrefs::UseLowPrecisionBuffer();
}
@ -277,8 +281,8 @@ SharedFrameMetricsHelper::AboutToCheckerboard(const FrameMetrics& aContentMetric
return false;
}
ClientMultiTiledLayerBuffer::ClientMultiTiledLayerBuffer(ClientTiledPaintedLayer& aPaintedLayer,
CompositableClient& aCompositableClient,
ClientMultiTiledLayerBuffer::ClientMultiTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
CompositableClient* aCompositableClient,
ClientLayerManager* aManager,
SharedFrameMetricsHelper* aHelper)
: ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
@ -303,16 +307,16 @@ gfxContentType
ClientTiledLayerBuffer::GetContentType(SurfaceMode* aMode) const
{
gfxContentType content =
mPaintedLayer.CanUseOpaqueSurface() ? gfxContentType::COLOR :
mPaintedLayer->CanUseOpaqueSurface() ? gfxContentType::COLOR :
gfxContentType::COLOR_ALPHA;
SurfaceMode mode = mPaintedLayer.GetSurfaceMode();
SurfaceMode mode = mPaintedLayer->GetSurfaceMode();
if (mode == SurfaceMode::SURFACE_COMPONENT_ALPHA) {
#if defined(MOZ_GFX_OPTIMIZE_MOBILE) || defined(MOZ_WIDGET_GONK)
mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA;
#else
if (!mPaintedLayer.GetParent() ||
!mPaintedLayer.GetParent()->SupportsComponentAlphaChildren()) {
if (!mPaintedLayer->GetParent() ||
!mPaintedLayer->GetParent()->SupportsComponentAlphaChildren()) {
mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA;
} else {
content = gfxContentType::COLOR;
@ -327,7 +331,7 @@ ClientTiledLayerBuffer::GetContentType(SurfaceMode* aMode) const
content = gfxContentType::COLOR_ALPHA;
}
#else
if (mPaintedLayer.MayResample()) {
if (mPaintedLayer->MayResample()) {
mode = SurfaceMode::SURFACE_SINGLE_CHANNEL_ALPHA;
content = gfxContentType::COLOR_ALPHA;
}
@ -398,7 +402,7 @@ TileClient::PrivateProtector::Set(TileClient * const aContainer, TextureClient*
// Placeholder
TileClient::TileClient()
: mWasPlaceholder(false)
: mCompositableClient(nullptr), mWasPlaceholder(false)
{
}
@ -416,11 +420,13 @@ TileClient::TileClient(const TileClient& o)
mBackBufferOnWhite = o.mBackBufferOnWhite;
mFrontBuffer = o.mFrontBuffer;
mFrontBufferOnWhite = o.mFrontBufferOnWhite;
mCompositableClient = o.mCompositableClient;
mWasPlaceholder = o.mWasPlaceholder;
mUpdateRect = o.mUpdateRect;
#ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
mLastUpdate = o.mLastUpdate;
#endif
mManager = o.mManager;
mAllocator = o.mAllocator;
mInvalidFront = o.mInvalidFront;
mInvalidBack = o.mInvalidBack;
@ -434,11 +440,13 @@ TileClient::operator=(const TileClient& o)
mBackBufferOnWhite = o.mBackBufferOnWhite;
mFrontBuffer = o.mFrontBuffer;
mFrontBufferOnWhite = o.mFrontBufferOnWhite;
mCompositableClient = o.mCompositableClient;
mWasPlaceholder = o.mWasPlaceholder;
mUpdateRect = o.mUpdateRect;
#ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
mLastUpdate = o.mLastUpdate;
#endif
mManager = o.mManager;
mAllocator = o.mAllocator;
mInvalidFront = o.mInvalidFront;
mInvalidBack = o.mInvalidBack;
@ -586,7 +594,7 @@ TileClient::DiscardBackBuffer()
static already_AddRefed<TextureClient>
CreateBackBufferTexture(TextureClient* aCurrentTexture,
CompositableClient& aCompositable,
CompositableClient* aCompositable,
TextureClientAllocator* aAllocator)
{
if (aCurrentTexture) {
@ -605,7 +613,7 @@ CreateBackBufferTexture(TextureClient* aCurrentTexture,
texture->EnableReadLock();
if (!aCompositable.AddTextureClient(texture)) {
if (!aCompositable->AddTextureClient(texture)) {
gfxCriticalError() << "[Tiling:Client] Failed to connect a TextureClient";
return nullptr;
}
@ -614,8 +622,7 @@ CreateBackBufferTexture(TextureClient* aCurrentTexture,
}
TextureClient*
TileClient::GetBackBuffer(CompositableClient& aCompositable,
const nsIntRegion& aDirtyRegion,
TileClient::GetBackBuffer(const nsIntRegion& aDirtyRegion,
gfxContentType aContent,
SurfaceMode aMode,
nsIntRegion& aAddPaintedRegion,
@ -647,7 +654,7 @@ TileClient::GetBackBuffer(CompositableClient& aCompositable,
} else {
if (!mBackBuffer || mBackBuffer->IsReadLocked()) {
mBackBuffer.Set(this,
CreateBackBufferTexture(mBackBuffer, aCompositable, mAllocator)
CreateBackBufferTexture(mBackBuffer, mCompositableClient, mAllocator)
);
if (!mBackBuffer) {
DiscardBackBuffer();
@ -660,7 +667,7 @@ TileClient::GetBackBuffer(CompositableClient& aCompositable,
if (aMode == SurfaceMode::SURFACE_COMPONENT_ALPHA
&& (!mBackBufferOnWhite || mBackBufferOnWhite->IsReadLocked())) {
mBackBufferOnWhite = CreateBackBufferTexture(
mBackBufferOnWhite, aCompositable, mAllocator
mBackBufferOnWhite, mCompositableClient, mAllocator
);
if (!mBackBufferOnWhite) {
DiscardBackBuffer();
@ -757,8 +764,8 @@ ClientMultiTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
void* aCallbackData,
bool aIsProgressive)
{
TILING_LOG("TILING %p: PaintThebes painting region %s\n", &mPaintedLayer, Stringify(aPaintRegion).c_str());
TILING_LOG("TILING %p: PaintThebes new valid region %s\n", &mPaintedLayer, Stringify(aNewValidRegion).c_str());
TILING_LOG("TILING %p: PaintThebes painting region %s\n", mPaintedLayer, Stringify(aPaintRegion).c_str());
TILING_LOG("TILING %p: PaintThebes new valid region %s\n", mPaintedLayer, Stringify(aNewValidRegion).c_str());
mCallback = aCallback;
mCallbackData = aCallbackData;
@ -888,11 +895,11 @@ ClientTiledLayerBuffer::UnlockTile(TileClient& aTile)
// We locked the back buffer, and flipped so we now need to unlock the front
if (aTile.mFrontBuffer && aTile.mFrontBuffer->IsLocked()) {
aTile.mFrontBuffer->Unlock();
aTile.mFrontBuffer->SyncWithObject(mCompositableClient.GetForwarder()->GetSyncObject());
aTile.mFrontBuffer->SyncWithObject(mCompositableClient->GetForwarder()->GetSyncObject());
}
if (aTile.mFrontBufferOnWhite && aTile.mFrontBufferOnWhite->IsLocked()) {
aTile.mFrontBufferOnWhite->Unlock();
aTile.mFrontBufferOnWhite->SyncWithObject(mCompositableClient.GetForwarder()->GetSyncObject());
aTile.mFrontBufferOnWhite->SyncWithObject(mCompositableClient->GetForwarder()->GetSyncObject());
}
if (aTile.mBackBuffer && aTile.mBackBuffer->IsLocked()) {
aTile.mBackBuffer->Unlock();
@ -977,7 +984,7 @@ void ClientMultiTiledLayerBuffer::Update(const nsIntRegion& newValidRegion,
ctx->SetMatrix(
ctx->CurrentMatrix().Scale(mResolution, mResolution).Translate(ThebesPoint(-mTilingOrigin)));
mCallback(&mPaintedLayer, ctx, aPaintRegion, aDirtyRegion,
mCallback(mPaintedLayer, ctx, aPaintRegion, aDirtyRegion,
DrawRegionClip::DRAW, nsIntRegion(), mCallbackData);
mMoz2DTiles.clear();
// Reset:
@ -1045,11 +1052,13 @@ ClientMultiTiledLayerBuffer::ValidateTile(TileClient& aTile,
gfxContentType content = GetContentType(&mode);
if (aTile.IsPlaceholderTile()) {
aTile.SetLayerManager(mManager);
aTile.SetTextureAllocator(mManager->GetCompositorBridgeChild()->GetTexturePool(
mManager->GetCompositorBackendType(),
gfxPlatform::GetPlatform()->Optimal2DFormatForContent(content),
TextureFlags::DISALLOW_BIGIMAGE | TextureFlags::IMMEDIATE_UPLOAD));
}
aTile.SetCompositableClient(mCompositableClient);
nsIntRegion offsetScaledDirtyRegion = aDirtyRegion.MovedBy(-aTileOrigin);
offsetScaledDirtyRegion.ScaleRoundOut(mResolution, mResolution);
@ -1057,8 +1066,7 @@ ClientMultiTiledLayerBuffer::ValidateTile(TileClient& aTile,
nsIntRegion extraPainted;
RefPtr<TextureClient> backBufferOnWhite;
RefPtr<TextureClient> backBuffer =
aTile.GetBackBuffer(mCompositableClient,
offsetScaledDirtyRegion,
aTile.GetBackBuffer(offsetScaledDirtyRegion,
content, mode,
extraPainted,
&backBufferOnWhite);
@ -1170,10 +1178,10 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
nsIntRegion staleRegion;
staleRegion.And(aInvalidRegion, aOldValidRegion);
TILING_LOG("TILING %p: Progressive update stale region %s\n", &mPaintedLayer, Stringify(staleRegion).c_str());
TILING_LOG("TILING %p: Progressive update stale region %s\n", mPaintedLayer, Stringify(staleRegion).c_str());
LayerMetricsWrapper scrollAncestor;
mPaintedLayer.GetAncestorLayers(&scrollAncestor, nullptr, nullptr);
mPaintedLayer->GetAncestorLayers(&scrollAncestor, nullptr, nullptr);
// Find out the current view transform to determine which tiles to draw
// first, and see if we should just abort this paint. Aborting is usually
@ -1189,7 +1197,7 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
viewTransform);
TILING_LOG("TILING %p: Progressive update view transform %s zoom %f abort %d\n",
&mPaintedLayer, ToString(viewTransform.mTranslation).c_str(), viewTransform.mScale.scale, abortPaint);
mPaintedLayer, ToString(viewTransform.mTranslation).c_str(), viewTransform.mScale.scale, abortPaint);
if (abortPaint) {
// We ignore if front-end wants to abort if this is the first,
@ -1208,14 +1216,14 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
GetCompositorSideCompositionBounds(scrollAncestor,
aPaintData->mTransformToCompBounds,
viewTransform,
ViewAs<LayerPixel>(Rect(mPaintedLayer.GetLayerBounds())));
ViewAs<LayerPixel>(Rect(mPaintedLayer->GetLayerBounds())));
if (!transformedCompositionBounds) {
aPaintData->mPaintFinished = true;
return false;
}
TILING_LOG("TILING %p: Progressive update transformed compositor bounds %s\n", &mPaintedLayer, Stringify(*transformedCompositionBounds).c_str());
TILING_LOG("TILING %p: Progressive update transformed compositor bounds %s\n", mPaintedLayer, Stringify(*transformedCompositionBounds).c_str());
// Compute a "coherent update rect" that we should paint all at once in a
// single transaction. This is to avoid rendering glitches on animated
@ -1234,7 +1242,7 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
#endif
).ToUnknownRect());
TILING_LOG("TILING %p: Progressive update final coherency rect %s\n", &mPaintedLayer, Stringify(coherentUpdateRect).c_str());
TILING_LOG("TILING %p: Progressive update final coherency rect %s\n", mPaintedLayer, Stringify(coherentUpdateRect).c_str());
aRegionToPaint.And(aInvalidRegion, coherentUpdateRect);
aRegionToPaint.Or(aRegionToPaint, staleRegion);
@ -1250,14 +1258,14 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
paintingVisible = true;
}
TILING_LOG("TILING %p: Progressive update final paint region %s\n", &mPaintedLayer, Stringify(aRegionToPaint).c_str());
TILING_LOG("TILING %p: Progressive update final paint region %s\n", mPaintedLayer, Stringify(aRegionToPaint).c_str());
// Paint area that's visible and overlaps previously valid content to avoid
// visible glitches in animated elements, such as gifs.
bool paintInSingleTransaction = paintingVisible && (drawingStale || aPaintData->mFirstPaint);
TILING_LOG("TILING %p: paintingVisible %d drawingStale %d firstPaint %d singleTransaction %d\n",
&mPaintedLayer, paintingVisible, drawingStale, aPaintData->mFirstPaint, paintInSingleTransaction);
mPaintedLayer, paintingVisible, drawingStale, aPaintData->mFirstPaint, paintInSingleTransaction);
// The following code decides what order to draw tiles in, based on the
// current scroll direction of the primary scrollable layer.
@ -1335,9 +1343,9 @@ ClientMultiTiledLayerBuffer::ProgressiveUpdate(nsIntRegion& aValidRegion,
LayerManager::DrawPaintedLayerCallback aCallback,
void* aCallbackData)
{
TILING_LOG("TILING %p: Progressive update valid region %s\n", &mPaintedLayer, Stringify(aValidRegion).c_str());
TILING_LOG("TILING %p: Progressive update invalid region %s\n", &mPaintedLayer, Stringify(aInvalidRegion).c_str());
TILING_LOG("TILING %p: Progressive update old valid region %s\n", &mPaintedLayer, Stringify(aOldValidRegion).c_str());
TILING_LOG("TILING %p: Progressive update valid region %s\n", mPaintedLayer, Stringify(aValidRegion).c_str());
TILING_LOG("TILING %p: Progressive update invalid region %s\n", mPaintedLayer, Stringify(aInvalidRegion).c_str());
TILING_LOG("TILING %p: Progressive update old valid region %s\n", mPaintedLayer, Stringify(aOldValidRegion).c_str());
bool repeat = false;
bool isBufferChanged = false;
@ -1351,7 +1359,7 @@ ClientMultiTiledLayerBuffer::ProgressiveUpdate(nsIntRegion& aValidRegion,
aPaintData,
repeat);
TILING_LOG("TILING %p: Progressive update computed paint region %s repeat %d\n", &mPaintedLayer, Stringify(regionToPaint).c_str(), repeat);
TILING_LOG("TILING %p: Progressive update computed paint region %s repeat %d\n", mPaintedLayer, Stringify(regionToPaint).c_str(), repeat);
// There's no further work to be done.
if (regionToPaint.IsEmpty()) {
@ -1375,8 +1383,8 @@ ClientMultiTiledLayerBuffer::ProgressiveUpdate(nsIntRegion& aValidRegion,
aInvalidRegion.Sub(aInvalidRegion, regionToPaint);
} while (repeat);
TILING_LOG("TILING %p: Progressive update final valid region %s buffer changed %d\n", &mPaintedLayer, Stringify(aValidRegion).c_str(), isBufferChanged);
TILING_LOG("TILING %p: Progressive update final invalid region %s\n", &mPaintedLayer, Stringify(aInvalidRegion).c_str());
TILING_LOG("TILING %p: Progressive update final valid region %s buffer changed %d\n", mPaintedLayer, Stringify(aValidRegion).c_str(), isBufferChanged);
TILING_LOG("TILING %p: Progressive update final invalid region %s\n", mPaintedLayer, Stringify(aInvalidRegion).c_str());
// Return false if nothing has been drawn, or give what has been drawn
// to the shadow layer to upload.

Просмотреть файл

@ -70,11 +70,20 @@ struct TileClient
return mFrontBuffer != o.mFrontBuffer;
}
void SetLayerManager(ClientLayerManager *aManager)
{
mManager = aManager;
}
void SetTextureAllocator(TextureClientAllocator* aAllocator)
{
mAllocator = aAllocator;
}
void SetCompositableClient(CompositableClient* aCompositableClient)
{
mCompositableClient = aCompositableClient;
}
bool IsPlaceholderTile() const
{
return mBackBuffer == nullptr && mFrontBuffer == nullptr;
@ -117,8 +126,7 @@ struct TileClient
*
* If nullptr is returned, aTextureClientOnWhite is undefined.
*/
TextureClient* GetBackBuffer(CompositableClient&,
const nsIntRegion& aDirtyRegion,
TextureClient* GetBackBuffer(const nsIntRegion& aDirtyRegion,
gfxContentType aContent, SurfaceMode aMode,
nsIntRegion& aAddPaintedRegion,
RefPtr<TextureClient>* aTextureClientOnWhite);
@ -145,8 +153,10 @@ struct TileClient
RefPtr<TextureClient> mBackBufferOnWhite;
RefPtr<TextureClient> mFrontBuffer;
RefPtr<TextureClient> mFrontBufferOnWhite;
RefPtr<ClientLayerManager> mManager;
RefPtr<TextureClientAllocator> mAllocator;
gfx::IntRect mUpdateRect;
CompositableClient* mCompositableClient;
bool mWasPlaceholder;
#ifdef GFX_TILEDLAYER_DEBUG_OVERLAY
TimeStamp mLastUpdate;
@ -279,8 +289,8 @@ private:
class ClientTiledLayerBuffer
{
public:
ClientTiledLayerBuffer(ClientTiledPaintedLayer& aPaintedLayer,
CompositableClient& aCompositableClient)
ClientTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
CompositableClient* aCompositableClient)
: mPaintedLayer(aPaintedLayer)
, mCompositableClient(aCompositableClient)
, mLastPaintContentType(gfxContentType::COLOR)
@ -322,8 +332,8 @@ protected:
void UnlockTile(TileClient& aTile);
gfxContentType GetContentType(SurfaceMode* aMode = nullptr) const;
ClientTiledPaintedLayer& mPaintedLayer;
CompositableClient& mCompositableClient;
ClientTiledPaintedLayer* mPaintedLayer;
CompositableClient* mCompositableClient;
gfxContentType mLastPaintContentType;
SurfaceMode mLastPaintSurfaceMode;
@ -338,10 +348,19 @@ class ClientMultiTiledLayerBuffer
{
friend class TiledLayerBuffer<ClientMultiTiledLayerBuffer, TileClient>;
public:
ClientMultiTiledLayerBuffer(ClientTiledPaintedLayer& aPaintedLayer,
CompositableClient& aCompositableClient,
ClientMultiTiledLayerBuffer(ClientTiledPaintedLayer* aPaintedLayer,
CompositableClient* aCompositableClient,
ClientLayerManager* aManager,
SharedFrameMetricsHelper* aHelper);
ClientMultiTiledLayerBuffer()
: ClientTiledLayerBuffer(nullptr, nullptr)
, mManager(nullptr)
, mCallback(nullptr)
, mCallbackData(nullptr)
, mSharedFrameMetricsHelper(nullptr)
, mTilingOrigin(std::numeric_limits<int32_t>::max(),
std::numeric_limits<int32_t>::max())
{}
void PaintThebes(const nsIntRegion& aNewValidRegion,
const nsIntRegion& aPaintRegion,
@ -416,7 +435,7 @@ protected:
TileClient GetPlaceholderTile() const { return TileClient(); }
private:
RefPtr<ClientLayerManager> mManager;
ClientLayerManager* mManager;
LayerManager::DrawPaintedLayerCallback mCallback;
void* mCallbackData;
@ -508,7 +527,7 @@ private:
class MultiTiledContentClient : public TiledContentClient
{
public:
MultiTiledContentClient(ClientTiledPaintedLayer& aPaintedLayer,
MultiTiledContentClient(ClientTiledPaintedLayer* aPaintedLayer,
ClientLayerManager* aManager);
protected: