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

Unified Diff: pdf/control.cc

Issue 298803010: Print Preview: Enable PrintPreviewTest on Linux ASAN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/control.cc
diff --git a/pdf/control.cc b/pdf/control.cc
index 34b60ba814e325f0151da8b32d2fbf128931a494..12bb7ed1689f872611f45124b139c33563d40891 100644
--- a/pdf/control.cc
+++ b/pdf/control.cc
@@ -44,11 +44,14 @@ void Control::PaintMultipleRects(pp::ImageData* image_data,
}
// Some rects in the input list may overlap. To prevent double
- // paining (causes problems with semi-transparent controls) we'll
+ // painting (causes problems with semi-transparent controls) we'll
// paint control into buffer image data only once and copy requested
// rectangles.
pp::ImageData buffer(owner()->GetInstance(), image_data->format(),
rect().size(), false);
+ if (buffer.is_null())
+ return;
+
pp::Rect draw_rc = pp::Rect(image_data->size()).Intersect(rect());
pp::Rect ctrl_rc = pp::Rect(rect().point() - draw_rc.point(), draw_rc.size());
CopyImage(*image_data, draw_rc, &buffer, ctrl_rc, false);
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698