зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1178376 - Put progressive paint status in tile updates r=nical
This commit is contained in:
Родитель
d06b91de48
Коммит
827acb829b
|
@ -45,6 +45,7 @@ ClientSingleTiledLayerBuffer::ClientSingleTiledLayerBuffer(ClientTiledPaintedLay
|
|||
ClientLayerManager* aManager)
|
||||
: ClientTiledLayerBuffer(aPaintedLayer, aCompositableClient)
|
||||
, mManager(aManager)
|
||||
, mWasLastPaintProgressive(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -89,7 +90,8 @@ ClientSingleTiledLayerBuffer::GetSurfaceDescriptorTiles()
|
|||
0, 0, 1, 1,
|
||||
1.0,
|
||||
mFrameResolution.xScale,
|
||||
mFrameResolution.yScale);
|
||||
mFrameResolution.yScale,
|
||||
mWasLastPaintProgressive);
|
||||
}
|
||||
|
||||
already_AddRefed<TextureClient>
|
||||
|
@ -105,8 +107,11 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
|||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion,
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData)
|
||||
void* aCallbackData,
|
||||
bool aIsProgressive)
|
||||
{
|
||||
mWasLastPaintProgressive = aIsProgressive;
|
||||
|
||||
// Compare layer visible region size to current backbuffer size, discard if not matching.
|
||||
IntSize size = mPaintedLayer->GetVisibleRegion().GetBounds().Size();
|
||||
IntPoint origin = mPaintedLayer->GetVisibleRegion().GetBounds().TopLeft();
|
||||
|
|
|
@ -41,7 +41,8 @@ public:
|
|||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion,
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData) override;
|
||||
void* aCallbackData,
|
||||
bool aIsProgressive = false) override;
|
||||
|
||||
bool SupportsProgressiveUpdate() override { return false; }
|
||||
bool ProgressiveUpdate(nsIntRegion& aValidRegion,
|
||||
|
@ -88,6 +89,7 @@ private:
|
|||
|
||||
nsIntRegion mPaintedRegion;
|
||||
nsIntRegion mValidRegion;
|
||||
bool mWasLastPaintProgressive;
|
||||
|
||||
/**
|
||||
* While we're adding tiles, this is used to keep track of the position of
|
||||
|
|
|
@ -905,7 +905,8 @@ ClientMultiTiledLayerBuffer::GetSurfaceDescriptorTiles()
|
|||
mTiles.mFirst.x, mTiles.mFirst.y,
|
||||
mTiles.mSize.width, mTiles.mSize.height,
|
||||
mResolution, mFrameResolution.xScale,
|
||||
mFrameResolution.yScale);
|
||||
mFrameResolution.yScale,
|
||||
mWasLastPaintProgressive);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -913,13 +914,15 @@ ClientMultiTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
|||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion,
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData)
|
||||
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());
|
||||
|
||||
mCallback = aCallback;
|
||||
mCallbackData = aCallbackData;
|
||||
mWasLastPaintProgressive = aIsProgressive;
|
||||
|
||||
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
||||
long start = PR_IntervalNow();
|
||||
|
@ -1653,7 +1656,7 @@ ClientMultiTiledLayerBuffer::ProgressiveUpdate(nsIntRegion& aValidRegion,
|
|||
|
||||
// Paint the computed region and subtract it from the invalid region.
|
||||
PaintThebes(validOrStale, regionToPaint, aInvalidRegion,
|
||||
aCallback, aCallbackData);
|
||||
aCallback, aCallbackData, true);
|
||||
aInvalidRegion.Sub(aInvalidRegion, regionToPaint);
|
||||
} while (repeat);
|
||||
|
||||
|
|
|
@ -407,13 +407,15 @@ public:
|
|||
, mCompositableClient(aCompositableClient)
|
||||
, mLastPaintContentType(gfxContentType::COLOR)
|
||||
, mLastPaintSurfaceMode(SurfaceMode::SURFACE_OPAQUE)
|
||||
, mWasLastPaintProgressive(false)
|
||||
{}
|
||||
|
||||
virtual void PaintThebes(const nsIntRegion& aNewValidRegion,
|
||||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion,
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData) = 0;
|
||||
void* aCallbackData,
|
||||
bool aIsProgressive = false) = 0;
|
||||
|
||||
virtual bool SupportsProgressiveUpdate() = 0;
|
||||
virtual bool ProgressiveUpdate(nsIntRegion& aValidRegion,
|
||||
|
@ -447,6 +449,8 @@ protected:
|
|||
gfxContentType mLastPaintContentType;
|
||||
SurfaceMode mLastPaintSurfaceMode;
|
||||
CSSToParentLayerScale2D mFrameResolution;
|
||||
|
||||
bool mWasLastPaintProgressive;
|
||||
};
|
||||
|
||||
class ClientMultiTiledLayerBuffer
|
||||
|
@ -473,7 +477,8 @@ public:
|
|||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion,
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData) override;
|
||||
void* aCallbackData,
|
||||
bool aIsProgressive = false) override;
|
||||
|
||||
virtual bool SupportsProgressiveUpdate() override { return true; }
|
||||
/**
|
||||
|
|
|
@ -341,6 +341,7 @@ struct SurfaceDescriptorTiles {
|
|||
float resolution;
|
||||
float frameXResolution;
|
||||
float frameYResolution;
|
||||
bool isProgressive;
|
||||
};
|
||||
|
||||
struct OpUseTiledLayerBuffer {
|
||||
|
|
Загрузка…
Ссылка в новой задаче