OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 | 536 |
537 if (contextDisabled() || displayList->bounds().isEmpty()) | 537 if (contextDisabled() || displayList->bounds().isEmpty()) |
538 return; | 538 return; |
539 | 539 |
540 realizeCanvasSave(); | 540 realizeCanvasSave(); |
541 | 541 |
542 const FloatRect& bounds = displayList->bounds(); | 542 const FloatRect& bounds = displayList->bounds(); |
543 if (bounds.x() || bounds.y()) | 543 if (bounds.x() || bounds.y()) |
544 m_canvas->translate(bounds.x(), bounds.y()); | 544 m_canvas->translate(bounds.x(), bounds.y()); |
545 | 545 |
546 m_canvas->drawPicture(*displayList->picture()); | 546 m_canvas->drawPicture(displayList->picture()); |
547 | 547 |
548 if (bounds.x() || bounds.y()) | 548 if (bounds.x() || bounds.y()) |
549 m_canvas->translate(-bounds.x(), -bounds.y()); | 549 m_canvas->translate(-bounds.x(), -bounds.y()); |
550 } | 550 } |
551 | 551 |
552 void GraphicsContext::setupPaintForFilling(SkPaint* paint) const | 552 void GraphicsContext::setupPaintForFilling(SkPaint* paint) const |
553 { | 553 { |
554 if (contextDisabled()) | 554 if (contextDisabled()) |
555 return; | 555 return; |
556 | 556 |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 | 1842 |
1843 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1843 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
1844 { | 1844 { |
1845 if (m_trackTextRegion) { | 1845 if (m_trackTextRegion) { |
1846 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1846 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
1847 m_textRegion.join(textRect); | 1847 m_textRegion.join(textRect); |
1848 } | 1848 } |
1849 } | 1849 } |
1850 | 1850 |
1851 } | 1851 } |
OLD | NEW |