From: Julian Smart <julian@anthemion.co.uk>
Date: Wed, 11 Jul 2001 17:27:23 +0000 (+0000)
Subject: Removed cacheing option
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/277480474552707c27c7466bb5e5d1738a16372b

Removed cacheing option


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/include/wx/dc.h b/include/wx/dc.h
index 8dc21ff6f0..eef4e7b99c 100644
--- a/include/wx/dc.h
+++ b/include/wx/dc.h
@@ -491,7 +491,7 @@ public:
     // Put ClearCache in the wxDC implementation class, since it has to be
     // static.
     // static void ClearCache() ;
-#if wxUSE_DC_CACHEING
+#if 0 // wxUSE_DC_CACHEING
     static void EnableCache(bool cacheing) { sm_cacheing = cacheing; }
     static bool CacheEnabled() { return sm_cacheing ; }
 #endif
@@ -699,7 +699,7 @@ protected:
     bool m_isInteractive:1;
     bool m_isBBoxValid:1;
 #if wxUSE_DC_CACHEING
-    static bool sm_cacheing;
+//    static bool sm_cacheing;
 #endif
 
     // coordinate system variables
diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp
index ae54f14f91..958d45969b 100644
--- a/src/common/dcbase.cpp
+++ b/src/common/dcbase.cpp
@@ -32,7 +32,7 @@
 
 #include <math.h>
 
-bool wxDCBase::sm_cacheing = FALSE;
+// bool wxDCBase::sm_cacheing = FALSE;
 
 // ============================================================================
 // implementation
diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp
index cae9668ac8..a9cfabdf12 100644
--- a/src/msw/dc.cpp
+++ b/src/msw/dc.cpp
@@ -1704,7 +1704,7 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
             HBITMAP buffer_bmap ;
 
 #if wxUSE_DC_CACHEING
-            if (CacheEnabled())
+            if (TRUE)
             {
                 // create a temp buffer bitmap and DCs to access it and the mask
                 wxDCCacheEntry* dcCacheEntry1 = FindDCInCache(NULL, source->GetHDC());
@@ -1776,14 +1776,13 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest,
             ::SelectObject(dc_mask, 0);
             ::SelectObject(dc_buffer, 0);
 
-#if wxUSE_DC_CACHEING
-            if (!CacheEnabled())
-#endif
+#if !wxUSE_DC_CACHEING
             {
                 ::DeleteDC(dc_mask);
                 ::DeleteDC(dc_buffer);
                 ::DeleteObject(buffer_bmap);
             }
+#endif
         }
     }
     else // no mask, just BitBlt() it