Bug 831086 - Prefer Metro gfx handling when resizing buffers. r=bas

This commit is contained in:
Brian R. Bondy 2013-09-17 19:21:30 -04:00
Родитель e8889d55a9
Коммит 2b2120bb85
2 изменённых файлов: 11 добавлений и 15 удалений

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

@ -25,9 +25,9 @@
#include "../d3d9/Nv3DVUtils.h"
#include "gfxCrashReporterUtils.h"
#include "nsWindowsHelpers.h"
#ifdef MOZ_METRO
#include "DXGI1_2.h"
#include "nsWindowsHelpers.h"
#endif
using namespace std;
@ -640,17 +640,15 @@ LayerManagerD3D10::VerifyBufferSize()
}
mRTView = nullptr;
if (gfxWindowsPlatform::IsOptimus()) {
mSwapChain->ResizeBuffers(1, rect.width, rect.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
#ifdef MOZ_METRO
} else if (IsRunningInWindowsMetro()) {
if (IsRunningInWindowsMetro()) {
mSwapChain->ResizeBuffers(2, rect.width, rect.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
mDisableSequenceForNextFrame = true;
#endif
} else if (gfxWindowsPlatform::IsOptimus()) {
mSwapChain->ResizeBuffers(1, rect.width, rect.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
} else {
mSwapChain->ResizeBuffers(1, rect.width, rect.height,
DXGI_FORMAT_B8G8R8A8_UNORM,

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

@ -750,17 +750,15 @@ CompositorD3D11::VerifyBufferSize()
mDefaultRT = nullptr;
if (gfxWindowsPlatform::IsOptimus()) {
mSwapChain->ResizeBuffers(1, mSize.width, mSize.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
#ifdef MOZ_METRO
} else if (IsRunningInWindowsMetro()) {
if (IsRunningInWindowsMetro()) {
mSwapChain->ResizeBuffers(2, mSize.width, mSize.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
mDisableSequenceForNextFrame = true;
#endif
} else if (gfxWindowsPlatform::IsOptimus()) {
mSwapChain->ResizeBuffers(1, mSize.width, mSize.height,
DXGI_FORMAT_B8G8R8A8_UNORM,
0);
} else {
mSwapChain->ResizeBuffers(1, mSize.width, mSize.height,
DXGI_FORMAT_B8G8R8A8_UNORM,