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

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

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.h
===================================================================
--- chrome/browser/renderer_host/backing_store.h (revision 17347)
+++ chrome/browser/renderer_host/backing_store.h (working copy)
@@ -63,9 +63,12 @@
#endif
// Paints the bitmap from the renderer onto the backing store.
+ // bitmap_rect is the rect of the whole bitmap, and paint_rect
+ // is a sub-rect of bitmap that we want to draw.
void PaintRect(base::ProcessHandle process,
TransportDIB* bitmap,
- const gfx::Rect& bitmap_rect);
+ const gfx::Rect& bitmap_rect,
+ const gfx::Rect& paint_rect);
// Scrolls the given rect in the backing store, replacing the given region
// identified by |bitmap_rect| by the bitmap in the file identified by the
@@ -95,8 +98,11 @@
#elif defined(OS_LINUX)
// Paints the bitmap from the renderer onto the backing store without
// using Xrender to composite the pixmaps.
+ // bitmap_rect is the rect of the whole bitmap, and paint_rect
+ // is a sub-rect of bitmap that we want to draw.
void PaintRectWithoutXrender(TransportDIB* bitmap,
- const gfx::Rect& bitmap_rect);
+ const gfx::Rect& bitmap_rect,
+ const gfx::Rect& paint_rect);
// This is the connection to the X server where this backing store will be
// displayed.
@@ -119,6 +125,10 @@
void* pixmap_gc_;
#endif
+ // Sanity checks on the size of the rects to draw so that we don't allocate
+ // enourmous pixmaps.
+ static int kMaxBitmapLengthAllowed;
+
DISALLOW_COPY_AND_ASSIGN(BackingStore);
};
@@ -158,6 +168,7 @@
base::ProcessHandle process_handle,
TransportDIB* bitmap,
const gfx::Rect& bitmap_rect,
+ const gfx::Rect& paint_rect,
bool* needs_full_paint);
// Returns a matching backing store for the host.
« no previous file with comments | « no previous file | chrome/browser/renderer_host/backing_store.cc » ('j') | chrome/browser/renderer_host/backing_store_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698