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

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

Issue 108040: Send array of paint rects and bitmaps as opposed to a Union (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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.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;
}

Powered by Google App Engine
This is Rietveld 408576698