mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
D2D: Remove unnecessary scaling in HwndPimpl::setSize
This commit is contained in:
parent
238edf6437
commit
e005a41d6b
2 changed files with 14 additions and 14 deletions
|
|
@ -428,7 +428,7 @@ public:
|
|||
{
|
||||
ScopedMultithread scopedMultithread { directX->getD2DMultithread() };
|
||||
|
||||
auto hr = swap.resize (size * (float) owner.getPhysicalPixelScaleFactor(), deviceContext);
|
||||
auto hr = swap.resize (size, deviceContext);
|
||||
jassert (SUCCEEDED (hr));
|
||||
if (FAILED (hr))
|
||||
teardown();
|
||||
|
|
|
|||
|
|
@ -4776,21 +4776,21 @@ private:
|
|||
// and then tells the swap chain to present the next swap chain back buffer.
|
||||
direct2DContext->setPhysicalPixelScaleFactor ((float) peer.getPlatformScaleFactor());
|
||||
|
||||
if (direct2DContext->startFrame())
|
||||
{
|
||||
peer.handlePaint (*direct2DContext);
|
||||
direct2DContext->endFrame();
|
||||
if (! direct2DContext->startFrame())
|
||||
return;
|
||||
|
||||
#if JUCE_DIRECT2D_METRICS
|
||||
if (lastPaintStartTicks > 0)
|
||||
{
|
||||
direct2DContext->metrics->addValueTicks (Direct2DMetrics::messageThreadPaintDuration,
|
||||
Time::getHighResolutionTicks() - paintStartTicks);
|
||||
direct2DContext->metrics->addValueTicks (Direct2DMetrics::frameInterval, paintStartTicks - lastPaintStartTicks);
|
||||
}
|
||||
lastPaintStartTicks = paintStartTicks;
|
||||
#endif
|
||||
peer.handlePaint (*direct2DContext);
|
||||
direct2DContext->endFrame();
|
||||
|
||||
#if JUCE_DIRECT2D_METRICS
|
||||
if (lastPaintStartTicks > 0)
|
||||
{
|
||||
direct2DContext->metrics->addValueTicks (Direct2DMetrics::messageThreadPaintDuration,
|
||||
Time::getHighResolutionTicks() - paintStartTicks);
|
||||
direct2DContext->metrics->addValueTicks (Direct2DMetrics::frameInterval, paintStartTicks - lastPaintStartTicks);
|
||||
}
|
||||
lastPaintStartTicks = paintStartTicks;
|
||||
#endif
|
||||
}
|
||||
|
||||
HWNDComponentPeer& peer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue