mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1025491 - Remove the DumpAsPNG() code in FilterNodeSoftware.cpp. r=mstange
This commit is contained in:
parent
f9af183166
commit
eaefe307f9
@ -19,22 +19,7 @@
|
||||
// #define DEBUG_DUMP_SURFACES
|
||||
|
||||
#ifdef DEBUG_DUMP_SURFACES
|
||||
#include "gfxImageSurface.h"
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
static void
|
||||
DumpAsPNG(SourceSurface* aSurface)
|
||||
{
|
||||
RefPtr<DataSourceSurface> dataSource = aSurface->GetDataSurface();
|
||||
IntSize size = dataSource->GetSize();
|
||||
nsRefPtr<gfxImageSurface> imageSurface =
|
||||
new gfxImageSurface(dataSource->GetData(), gfxIntSize(size.width, size.height),
|
||||
dataSource->Stride(),
|
||||
aSurface->GetFormat() == SurfaceFormat::A8 ? gfxImageFormat::A8 : gfxImageFormat::ARGB32);
|
||||
imageSurface->PrintAsDataURL();
|
||||
}
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
#include "gfxUtils.h" // not part of Moz2D
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
@ -672,7 +657,7 @@ FilterNodeSoftware::Draw(DrawTarget* aDrawTarget,
|
||||
|
||||
#ifdef DEBUG_DUMP_SURFACES
|
||||
printf("output from %s:\n", GetName());
|
||||
printf("<img src='"); DumpAsPNG(result); printf("'>\n");
|
||||
printf("<img src='"); gfxUtils::DumpAsDataURL(result); printf("'>\n");
|
||||
printf("</pre>\n");
|
||||
#endif
|
||||
|
||||
@ -852,7 +837,7 @@ FilterNodeSoftware::GetInputDataSourceSurface(uint32_t aInputEnumIndex,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DUMP_SURFACES
|
||||
printf("<img src='"); DumpAsPNG(result); printf("'></section>");
|
||||
printf("<img src='"); gfxUtils::DumpAsDataURL(result); printf("'></section>");
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(!result || result->GetSize() == aRect.Size(), "wrong surface size");
|
||||
|
@ -699,13 +699,6 @@ gfxASurface::DumpAsDataURL(FILE* aOutput)
|
||||
WriteAsPNG_internal(aOutput, false);
|
||||
}
|
||||
|
||||
void
|
||||
gfxASurface::PrintAsDataURL()
|
||||
{
|
||||
WriteAsPNG_internal(stdout, false);
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
|
||||
void
|
||||
gfxASurface::CopyAsDataURL()
|
||||
{
|
||||
|
@ -189,11 +189,6 @@ public:
|
||||
*/
|
||||
void DumpAsDataURL(FILE* aOutput = stdout);
|
||||
|
||||
/**
|
||||
* Write as a PNG encoded Data URL to stdout.
|
||||
*/
|
||||
void PrintAsDataURL();
|
||||
|
||||
/**
|
||||
* Copy a PNG encoded Data URL to the clipboard.
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "gfxUtils.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "gfxDrawable.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "Framebuffer.h"
|
||||
#include "gfxContext.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "GLContextProvider.h"
|
||||
|
Loading…
Reference in New Issue
Block a user