- if (CacheEnabled())
- {
- // create a temp buffer bitmap and DCs to access it and the mask
- wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
- dc_mask = (HDC) dcCacheEntry1->m_dc;
-
- wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, dest->GetHDC());
- dc_buffer = (HDC) dcCacheEntry2->m_dc;
-
- wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(dest->GetHDC(),
- width, height);
-
- buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap;
- }
- else
-#endif
- {
- // create a temp buffer bitmap and DCs to access it and the mask
- dc_mask = ::CreateCompatibleDC(GetHdcOf(*source));
- dc_buffer = ::CreateCompatibleDC(GetHdc());
- buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height);
- ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
- ::SelectObject(dc_buffer, buffer_bmap);
- }
+ // create a temp buffer bitmap and DCs to access it and the mask
+ wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
+ dc_mask = (HDC) dcCacheEntry1->m_dc;
+
+ wxDCCacheEntry* dcCacheEntry2 = FindDCInCache(dcCacheEntry1, GetHDC());
+ dc_buffer = (HDC) dcCacheEntry2->m_dc;
+
+ wxDCCacheEntry* bitmapCacheEntry = FindBitmapInCache(GetHDC(),
+ width, height);
+
+ buffer_bmap = (HBITMAP) bitmapCacheEntry->m_bitmap;
+#else // !wxUSE_DC_CACHEING
+ // create a temp buffer bitmap and DCs to access it and the mask
+ dc_mask = ::CreateCompatibleDC(GetHdcOf(*source));
+ dc_buffer = ::CreateCompatibleDC(GetHdc());
+ buffer_bmap = ::CreateCompatibleBitmap(GetHdc(), width, height);
+#endif // wxUSE_DC_CACHEING/!wxUSE_DC_CACHEING
+ ::SelectObject(dc_mask, (HBITMAP) mask->GetMaskBitmap());
+ ::SelectObject(dc_buffer, buffer_bmap);