Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1926)

Unified Diff: chrome/browser/renderer_host/backing_store_win.cc

Issue 146095: change backing store cache to be memory-based rather than count (Closed)
Patch Set: added better MemorySize() and comments Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/backing_store_win.cc
diff --git a/chrome/browser/renderer_host/backing_store_win.cc b/chrome/browser/renderer_host/backing_store_win.cc
index 54b67c6dee1903f66e77f8d04ed8d9a439223fa3..ef09f8939e6c9901d01dd6f33eb38d75b561c815 100644
--- a/chrome/browser/renderer_host/backing_store_win.cc
+++ b/chrome/browser/renderer_host/backing_store_win.cc
@@ -74,6 +74,10 @@ BackingStore::~BackingStore() {
DeleteDC(hdc_);
}
+size_t BackingStore::MemorySize() {
+ return size_.GetArea() * (color_depth_ / 8);
+}
+
// static
bool BackingStore::ColorManagementEnabled() {
static bool enabled = false;

Powered by Google App Engine
This is Rietveld 408576698