From a8ac1e3240125ae903711e5347fb597967529939 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Sep 2018 00:30:53 +0200 Subject: [PATCH] Graphics benchmark compilation fix under Unix Only use wxMSW-specific wxBitmap::UseAlpha() when using this port. See 7ddb522ec2040eb0fb6472b104a19c727350ef7e --- tests/benchmarks/graphics.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/benchmarks/graphics.cpp b/tests/benchmarks/graphics.cpp index fd361bbffa..2d54a8adc8 100644 --- a/tests/benchmarks/graphics.cpp +++ b/tests/benchmarks/graphics.cpp @@ -152,7 +152,9 @@ public: Connect(wxEVT_SIZE, wxSizeEventHandler(GraphicsBenchmarkFrame::OnSize)); m_bitmapARGB.Create(64, 64, 32); +#ifdef __WXMSW__ m_bitmapARGB.UseAlpha(true); +#endif // __WXMSW__ m_bitmapRGB.Create(64, 64, 24); m_renderer = NULL; @@ -320,8 +322,12 @@ private: BenchmarkDCAndGC("RGB memory", dc, gcdc); } { +#ifdef __WXMSW__ wxBitmap bmp(opts.width, opts.height, 32); bmp.UseAlpha(false); +#else // !__WXMSW__ + wxBitmap bmp(opts.width, opts.height, 24); +#endif // __WXMSW__/!__WXMSW__ wxMemoryDC dc(bmp); wxGCDC gcdc; if ( m_renderer ) @@ -333,7 +339,9 @@ private: } { wxBitmap bmp(opts.width, opts.height, 32); +#ifdef __WXMSW__ bmp.UseAlpha(true); +#endif // __WXMSW__ wxMemoryDC dc(bmp); wxGCDC gcdc; if ( m_renderer )