OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "printing/printed_document.h" | 5 #include "printing/printed_document.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "printing/page_number.h" | 8 #include "printing/page_number.h" |
9 #include "printing/printed_pages_source.h" | 9 #include "printing/printed_pages_source.h" |
10 #include "printing/printed_page.h" | 10 #include "printing/printed_page.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 xform.eM11 = xform.eM22 = 1.f / shrink_factor; | 23 xform.eM11 = xform.eM22 = 1.f / shrink_factor; |
24 BOOL res = ModifyWorldTransform(context, &xform, MWT_LEFTMULTIPLY); | 24 BOOL res = ModifyWorldTransform(context, &xform, MWT_LEFTMULTIPLY); |
25 DCHECK_NE(res, 0); | 25 DCHECK_NE(res, 0); |
26 } | 26 } |
27 | 27 |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace printing { | 30 namespace printing { |
31 | 31 |
32 void PrintedDocument::RenderPrintedPage( | 32 void PrintedDocument::RenderPrintedPage( |
33 const PrintedPage& page, gfx::NativeDrawingContext context) const { | 33 const PrintedPage& page, |
| 34 skia::NativeDrawingContext context) const { |
34 #ifndef NDEBUG | 35 #ifndef NDEBUG |
35 { | 36 { |
36 // Make sure the page is from our list. | 37 // Make sure the page is from our list. |
37 base::AutoLock lock(lock_); | 38 base::AutoLock lock(lock_); |
38 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); | 39 DCHECK(&page == mutable_.pages_.find(page.page_number() - 1)->second.get()); |
39 } | 40 } |
40 #endif | 41 #endif |
41 | 42 |
42 DCHECK(context); | 43 DCHECK(context); |
43 | 44 |
(...skipping 29 matching lines...) Expand all Loading... |
73 | 74 |
74 BOOL res = RestoreDC(context, saved_state); | 75 BOOL res = RestoreDC(context, saved_state); |
75 DCHECK_NE(res, 0); | 76 DCHECK_NE(res, 0); |
76 } | 77 } |
77 | 78 |
78 int res = RestoreDC(context, saved_state); | 79 int res = RestoreDC(context, saved_state); |
79 DCHECK_NE(res, 0); | 80 DCHECK_NE(res, 0); |
80 } | 81 } |
81 | 82 |
82 } // namespace printing | 83 } // namespace printing |
OLD | NEW |