diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 21:33:57 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 21:33:57 +0000 |
commit | 3a536fc46ebb5a9a29197337ca3ce8d8ce45822e (patch) | |
tree | 3efaf13ac282a7b8bc68efb57a8c734aecec6b36 /webkit | |
parent | 6867ba3609ac7ba4f4dee12a4d4bc1e9bcc5bc19 (diff) | |
download | chromium_src-3a536fc46ebb5a9a29197337ca3ce8d8ce45822e.zip chromium_src-3a536fc46ebb5a9a29197337ca3ce8d8ce45822e.tar.gz chromium_src-3a536fc46ebb5a9a29197337ca3ce8d8ce45822e.tar.bz2 |
Update NULL rect handling. I updated the API but forgot to change the Chrome
side, resulting in a crash when you try to paint the entire plugin.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/2035015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46966 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/pepper_device_context_2d.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webkit/glue/plugins/pepper_device_context_2d.cc b/webkit/glue/plugins/pepper_device_context_2d.cc index bd5cca3..0ccba5c 100644 --- a/webkit/glue/plugins/pepper_device_context_2d.cc +++ b/webkit/glue/plugins/pepper_device_context_2d.cc @@ -102,12 +102,11 @@ void DeviceContext2D::PaintImageData(PP_Resource image, const SkBitmap& new_image_bitmap = new_image_data->GetMappedBitmap(); // TODO(brettw) handle multiple dirty rects. - DCHECK(dirty_rect_count == 1); + DCHECK(dirty_rect_count <= 1); // Draw the bitmap to the backing store. SkIRect src_rect; - if (dirty->point.x == 0 && dirty->point.y == 0 && - dirty->size.width == 0 && dirty->size.height == 0) { + if (dirty_rect_count == 0 || !dirty) { // Default to the entire bitmap. src_rect.fLeft = 0; src_rect.fTop = 0; |