diff --git a/Library/MeterButton.cpp b/Library/MeterButton.cpp index 42a07004..709c01fd 100644 --- a/Library/MeterButton.cpp +++ b/Library/MeterButton.cpp @@ -169,71 +169,6 @@ bool CMeterButton::Draw(Graphics& graphics) // Blit the image graphics.DrawCachedBitmap(m_Bitmaps[m_State], x, y); - - // TEST -/* HDC desktopDC = GetDC(GetDesktopWindow()); - HDC dc = CreateCompatibleDC(desktopDC); - HBITMAP bm = CreateCompatibleBitmap(desktopDC, 200, 200); - ReleaseDC(GetDesktopWindow(), desktopDC); - HBITMAP oldBM = (HBITMAP)SelectObject(dc, bm); - - Graphics dgfx(GetDesktopWindow()); - Bitmap nbg(200, 200, PixelFormat32bppARGB); - Bitmap nbm(L"button.png"); - - Graphics gfx1(&nbg); - Graphics gfx2(dc); - - CachedBitmap cbm1(&nbm, &gfx1); - CachedBitmap cbm2(&nbm, &gfx2); - - Rect r(0, 0, nbm.GetWidth(), nbm.GetHeight()); - int i; - - SolidBrush solid(Color(255, 155, 123, 232)); - - DWORD time = GetTickCount(); - for (i = 0; i < 1000000; i++) - { - gfx1.DrawImage(&nbm, r, 0, 0, nbm.GetWidth(), nbm.GetHeight(), UnitPixel); -// gfx1.FillRectangle(&solid, 0, 0, nbm.GetWidth(), nbm.GetHeight()); // 2156 - } - DebugLog("Bitmap 2 Bitmap: %i", GetTickCount() - time); // 469 - - time = GetTickCount(); - for (i = 0; i < 1000000; i++) - { - gfx1.DrawCachedBitmap(&cbm1, 0, 0); - } - DebugLog("CachedBitmap 2 Bitmap: %i", GetTickCount() - time); // 125 - - time = GetTickCount(); - for (i = 0; i < 1000000; i++) - { - gfx2.DrawImage(&nbm, r, 0, 0, nbm.GetWidth(), nbm.GetHeight(), UnitPixel); -// gfx2.FillRectangle(&solid, 0, 0, nbm.GetWidth(), nbm.GetHeight()); // 797 - } - DebugLog("Bitmap 2 CachedBitmap: %i", GetTickCount() - time); // 469 - - time = GetTickCount(); - for (i = 0; i < 1000000; i++) - { - gfx2.DrawCachedBitmap(&cbm1, 0, 0); - } - DebugLog("CachedBitmap 2 CachedBitmap: %i", GetTickCount() - time); // 109 - - time = GetTickCount(); - for (i = 0; i < 1000000; i++) - { - gfx2.DrawCachedBitmap(&cbm2, 0, 0); - } - DebugLog("CachedBitmap 2 CachedBitmap 2: %i", GetTickCount() - time); // 125 - - SelectObject(dc, oldBM); - DeleteDC(dc); - DeleteObject(bm); -*/ - // ~TEST return true; }