GraphicsBenchmarkFrame() : wxFrame(NULL, wxID_ANY, "wxWidgets Graphics Benchmark") { Connect(wxEVT_PAINT, wxPaintEventHandler(GraphicsBenchmarkFrame::OnPaint)); Show(); SetClientSize(opts.width, opts.height); wxClientDC dc(this); BenchmarkLines("client", dc); wxBitmap bmp(opts.width, opts.height); wxMemoryDC dc2(bmp); BenchmarkLines("memory", dc2); }
void OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); BenchmarkLines(" paint", dc); wxTheApp->ExitMainLoop(); }
void BenchmarkAll(const wxString& msg, wxDC& dc) { BenchmarkBitmaps(msg, dc); BenchmarkImages(msg, dc); BenchmarkLines(msg, dc); BenchmarkRawBitmaps(msg, dc); BenchmarkRectangles(msg, dc); BenchmarkRoundedRectangles(msg, dc); BenchmarkCircles(msg, dc); BenchmarkEllipses(msg, dc); }