diff options
author | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 13:58:30 +0000 |
---|---|---|
committer | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-15 13:58:30 +0000 |
commit | c2d1d3bdc97218d7bb123fb2623347632fdc4ee5 (patch) | |
tree | 62f47d49aec7a0f57a41d04bc272daf76cccf0cf /chrome/browser/renderer_host/backing_store.h | |
parent | 1149bde26565fa08c3e14103ec5b02c00db82cf9 (diff) | |
download | chromium_src-c2d1d3bdc97218d7bb123fb2623347632fdc4ee5.zip chromium_src-c2d1d3bdc97218d7bb123fb2623347632fdc4ee5.tar.gz chromium_src-c2d1d3bdc97218d7bb123fb2623347632fdc4ee5.tar.bz2 |
This is to thest the page cycler performance without the resize corner, to see if these paint optimizations are worth it.
I will revert these changes as needed... You may revert them yourself if they cause you trouble before I get to revert them.
I have tested these changes on two different linux configuration, but there are more code paths that I couldn't verify myself, though agl gave me the OK anyway.
These changes have already been reviewed here:
http://codereview.chromium.org/108040
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18383 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/backing_store.h')
-rw-r--r-- | chrome/browser/renderer_host/backing_store.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/backing_store.h b/chrome/browser/renderer_host/backing_store.h index 5d817d0..5bb3945 100644 --- a/chrome/browser/renderer_host/backing_store.h +++ b/chrome/browser/renderer_host/backing_store.h @@ -63,9 +63,12 @@ class BackingStore { #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 @@ class BackingStore { #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 @@ class BackingStore { 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); }; |