diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 21:06:41 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 21:06:41 +0000 |
commit | fb3b1097c848f564a2f79cc0fef526f74ae85297 (patch) | |
tree | 3362a97dc2090f10a828d70b58093e700ab5b14d | |
parent | ffe88f7578d07e1924d88abc9e4b6e3d112e6345 (diff) | |
download | chromium_src-fb3b1097c848f564a2f79cc0fef526f74ae85297.zip chromium_src-fb3b1097c848f564a2f79cc0fef526f74ae85297.tar.gz chromium_src-fb3b1097c848f564a2f79cc0fef526f74ae85297.tar.bz2 |
Remove non-full paints from uninitialized backing store
When we create a new backing store, by definition, we don't have the
previous bits, so it does not make sense to draw a small dransport
dib over what ammounts to black pixels.
BUG=13762
TEST=see bug
Review URL: http://codereview.chromium.org/193017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25512 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/backing_store_manager.cc | 3 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.cc | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/renderer_host/backing_store_manager.cc b/chrome/browser/renderer_host/backing_store_manager.cc index 98ce3bd..4ea7349 100644 --- a/chrome/browser/renderer_host/backing_store_manager.cc +++ b/chrome/browser/renderer_host/backing_store_manager.cc @@ -173,6 +173,9 @@ BackingStore* BackingStoreManager::PrepareBackingStore( bitmap_rect.x() != 0 || bitmap_rect.y() != 0) { DCHECK(needs_full_paint != NULL); *needs_full_paint = true; + // Makes no sense to paint the transport dib if we are going + // to request a full paint. + return NULL; } backing_store = CreateBackingStore(host, backing_store_size); } diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index e14b846..e28b006 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -844,12 +844,10 @@ void RenderWidgetHost::PaintBackingStoreRect(TransportDIB* bitmap, } bool needs_full_paint = false; - BackingStore* backing_store = - BackingStoreManager::PrepareBackingStore(this, view_size, - process_->process().handle(), - bitmap, bitmap_rect, - &needs_full_paint); - DCHECK(backing_store != NULL); + BackingStoreManager::PrepareBackingStore(this, view_size, + process_->process().handle(), + bitmap, bitmap_rect, + &needs_full_paint); if (needs_full_paint) { repaint_start_time_ = TimeTicks::Now(); repaint_ack_pending_ = true; |