summaryrefslogtreecommitdiffstats
path: root/printing/printed_document_cairo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'printing/printed_document_cairo.cc')
-rw-r--r--printing/printed_document_cairo.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/printing/printed_document_cairo.cc b/printing/printed_document_cairo.cc
index 9992bc6..cb9bbd0 100644
--- a/printing/printed_document_cairo.cc
+++ b/printing/printed_document_cairo.cc
@@ -24,9 +24,12 @@ void PrintedDocument::RenderPrintedPage(
DCHECK(context);
#if !defined(OS_CHROMEOS)
- if (page.page_number() == 1) {
- reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument(
- page.native_metafile());
+ {
+ base::AutoLock lock(lock_);
+ if (page.page_number() - 1 == mutable_.first_page) {
+ reinterpret_cast<PrintingContextCairo*>(context)->PrintDocument(
+ page.native_metafile());
+ }
}
#endif // !defined(OS_CHROMEOS)
}