зеркало из https://github.com/mozilla/gecko-dev.git
Bug 806406: Remove some lingering references to gfxD2DSurface. r=jrmuizel
This commit is contained in:
Родитель
536b10f3dd
Коммит
26c2269500
|
@ -3343,11 +3343,6 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager,
|
||||||
|
|
||||||
gfxASurface *nsWindow::GetThebesSurface()
|
gfxASurface *nsWindow::GetThebesSurface()
|
||||||
{
|
{
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
if (mD2DWindowSurface) {
|
|
||||||
return mD2DWindowSurface;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (mPaintDC)
|
if (mPaintDC)
|
||||||
return (new gfxWindowsSurface(mPaintDC));
|
return (new gfxWindowsSurface(mPaintDC));
|
||||||
|
|
||||||
|
@ -6442,13 +6437,6 @@ void nsWindow::OnDestroy()
|
||||||
// Send a resize message to the listener
|
// Send a resize message to the listener
|
||||||
bool nsWindow::OnResize(nsIntRect &aWindowRect)
|
bool nsWindow::OnResize(nsIntRect &aWindowRect)
|
||||||
{
|
{
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
if (mD2DWindowSurface) {
|
|
||||||
mD2DWindowSurface = nullptr;
|
|
||||||
Invalidate();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool result = mWidgetListener ?
|
bool result = mWidgetListener ?
|
||||||
mWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height) : false;
|
mWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height) : false;
|
||||||
|
|
||||||
|
@ -6836,14 +6824,6 @@ nsresult nsWindow::UpdateTranslucentWindow()
|
||||||
::UpdateLayeredWindow(hWnd, nullptr, (POINT*)&winRect, &winSize, mMemoryDC,
|
::UpdateLayeredWindow(hWnd, nullptr, (POINT*)&winRect, &winSize, mMemoryDC,
|
||||||
&srcPos, 0, &bf, ULW_ALPHA);
|
&srcPos, 0, &bf, ULW_ALPHA);
|
||||||
|
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() ==
|
|
||||||
gfxWindowsPlatform::RENDER_DIRECT2D) {
|
|
||||||
nsIntRect r(0, 0, 0, 0);
|
|
||||||
static_cast<gfxD2DSurface*>(mTransparentSurface.get())->ReleaseDC(&r);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!updateSuccesful) {
|
if (!updateSuccesful) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -7091,9 +7071,6 @@ BOOL CALLBACK nsWindow::ClearResourcesCallback(HWND aWnd, LPARAM aMsg)
|
||||||
void
|
void
|
||||||
nsWindow::ClearCachedResources()
|
nsWindow::ClearCachedResources()
|
||||||
{
|
{
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
mD2DWindowSurface = nullptr;
|
|
||||||
#endif
|
|
||||||
if (mLayerManager &&
|
if (mLayerManager &&
|
||||||
mLayerManager->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
mLayerManager->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||||
mLayerManager->ClearCachedResources();
|
mLayerManager->ClearCachedResources();
|
||||||
|
|
|
@ -29,10 +29,6 @@
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "nsMargin.h"
|
#include "nsMargin.h"
|
||||||
|
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
#include "gfxD2DSurface.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "nsWinGesture.h"
|
#include "nsWinGesture.h"
|
||||||
|
|
||||||
#include "WindowHook.h"
|
#include "WindowHook.h"
|
||||||
|
@ -548,10 +544,6 @@ protected:
|
||||||
|
|
||||||
nsIntRect mLastPaintBounds;
|
nsIntRect mLastPaintBounds;
|
||||||
|
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
nsRefPtr<gfxD2DSurface> mD2DWindowSurface; // Surface for this window.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Transparency
|
// Transparency
|
||||||
#ifdef MOZ_XUL
|
#ifdef MOZ_XUL
|
||||||
// Use layered windows to support full 256 level alpha translucency
|
// Use layered windows to support full 256 level alpha translucency
|
||||||
|
|
|
@ -323,27 +323,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
if (!targetSurface &&
|
|
||||||
IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D))
|
|
||||||
{
|
|
||||||
if (!mD2DWindowSurface) {
|
|
||||||
gfxContentType content = gfxContentType::COLOR;
|
|
||||||
#if defined(MOZ_XUL)
|
|
||||||
if (mTransparencyMode != eTransparencyOpaque) {
|
|
||||||
content = gfxContentType::COLOR_ALPHA;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
mD2DWindowSurface = new gfxD2DSurface(mWnd, content);
|
|
||||||
}
|
|
||||||
if (!mD2DWindowSurface->CairoStatus()) {
|
|
||||||
targetSurface = mD2DWindowSurface;
|
|
||||||
} else {
|
|
||||||
mD2DWindowSurface = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsRefPtr<gfxWindowsSurface> targetSurfaceWin;
|
nsRefPtr<gfxWindowsSurface> targetSurfaceWin;
|
||||||
if (!targetSurface &&
|
if (!targetSurface &&
|
||||||
(IsRenderMode(gfxWindowsPlatform::RENDER_GDI) ||
|
(IsRenderMode(gfxWindowsPlatform::RENDER_GDI) ||
|
||||||
|
@ -451,13 +430,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
||||||
UpdateTranslucentWindow();
|
UpdateTranslucentWindow();
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
|
||||||
if (result) {
|
|
||||||
if (mD2DWindowSurface) {
|
|
||||||
mD2DWindowSurface->Present();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24) ||
|
if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24) ||
|
||||||
IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32))
|
IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32))
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#include "MetroWidget.h"
|
#include "MetroWidget.h"
|
||||||
#include "MetroInput.h"
|
#include "MetroInput.h"
|
||||||
#include "gfxWindowsPlatform.h"
|
#include "gfxWindowsPlatform.h"
|
||||||
#include "gfxD2DSurface.h"
|
|
||||||
#include "nsDataHashtable.h"
|
#include "nsDataHashtable.h"
|
||||||
|
|
||||||
#include "mozwrlbase.h"
|
#include "mozwrlbase.h"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче