mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1027362 - Remove the old basic frame counter. r=jrmuizel
This commit is contained in:
parent
b34d0ce046
commit
91578ecf84
@ -536,35 +536,6 @@ BasicLayerManager::AbortTransaction()
|
|||||||
mInTransaction = false;
|
mInTransaction = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint16_t sFrameCount = 0;
|
|
||||||
void
|
|
||||||
BasicLayerManager::RenderDebugOverlay()
|
|
||||||
{
|
|
||||||
if (!gfxPrefs::DrawFrameCounter()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
profiler_set_frame_number(sFrameCount);
|
|
||||||
|
|
||||||
uint16_t frameNumber = sFrameCount;
|
|
||||||
const uint16_t bitWidth = 3;
|
|
||||||
for (size_t i = 0; i < 16; i++) {
|
|
||||||
|
|
||||||
gfxRGBA bitColor;
|
|
||||||
if ((frameNumber >> i) & 0x1) {
|
|
||||||
bitColor = gfxRGBA(0, 0, 0, 1.0);
|
|
||||||
} else {
|
|
||||||
bitColor = gfxRGBA(1.0, 1.0, 1.0, 1.0);
|
|
||||||
}
|
|
||||||
mTarget->NewPath();
|
|
||||||
mTarget->SetColor(bitColor);
|
|
||||||
mTarget->Rectangle(gfxRect(bitWidth*i, 0, bitWidth, bitWidth));
|
|
||||||
mTarget->Fill();
|
|
||||||
}
|
|
||||||
// We intentionally overflow at 2^16.
|
|
||||||
sFrameCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
||||||
void* aCallbackData,
|
void* aCallbackData,
|
||||||
@ -637,7 +608,6 @@ BasicLayerManager::EndTransactionInternal(DrawThebesLayerCallback aCallback,
|
|||||||
if (mWidget) {
|
if (mWidget) {
|
||||||
FlashWidgetUpdateArea(mTarget);
|
FlashWidgetUpdateArea(mTarget);
|
||||||
}
|
}
|
||||||
RenderDebugOverlay();
|
|
||||||
RecordFrame();
|
RecordFrame();
|
||||||
PostPresent();
|
PostPresent();
|
||||||
|
|
||||||
|
@ -176,8 +176,6 @@ protected:
|
|||||||
|
|
||||||
void FlashWidgetUpdateArea(gfxContext* aContext);
|
void FlashWidgetUpdateArea(gfxContext* aContext);
|
||||||
|
|
||||||
void RenderDebugOverlay();
|
|
||||||
|
|
||||||
// Widget whose surface should be used as the basis for ThebesLayer
|
// Widget whose surface should be used as the basis for ThebesLayer
|
||||||
// buffers.
|
// buffers.
|
||||||
nsIWidget* mWidget;
|
nsIWidget* mWidget;
|
||||||
|
Loading…
Reference in New Issue
Block a user