Index: chrome/browser/renderer_host/backing_store.cc |
=================================================================== |
--- chrome/browser/renderer_host/backing_store.cc (revision 17347) |
+++ chrome/browser/renderer_host/backing_store.cc (working copy) |
@@ -51,6 +51,8 @@ |
// BackingStoreManager --------------------------------------------------------- |
// static |
+int BackingStore::kMaxBitmapLengthAllowed = 100000; |
+ |
BackingStore* BackingStoreManager::GetBackingStore( |
RenderWidgetHost* host, |
const gfx::Size& desired_size) { |
@@ -73,13 +75,14 @@ |
base::ProcessHandle process_handle, |
TransportDIB* bitmap, |
const gfx::Rect& bitmap_rect, |
+ const gfx::Rect& paint_rect, |
bool* needs_full_paint) { |
BackingStore* backing_store = GetBackingStore(host, backing_store_size); |
if (!backing_store) { |
// We need to get Webkit to generate a new paint here, as we |
// don't have a previous snapshot. |
- if (bitmap_rect.size() != backing_store_size || |
- bitmap_rect.x() != 0 || bitmap_rect.y() != 0) { |
+ if (paint_rect.size() != backing_store_size || |
+ paint_rect.x() != 0 || paint_rect.y() != 0) { |
DCHECK(needs_full_paint != NULL); |
*needs_full_paint = true; |
} |
@@ -87,7 +90,7 @@ |
} |
DCHECK(backing_store != NULL); |
- backing_store->PaintRect(process_handle, bitmap, bitmap_rect); |
+ backing_store->PaintRect(process_handle, bitmap, bitmap_rect, paint_rect); |
return backing_store; |
} |