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 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 { | 1649 { |
1650 #if defined(SK_DEBUG) | 1650 #if defined(SK_DEBUG) |
1651 { | 1651 { |
1652 SkPaint defaultPaint; | 1652 SkPaint defaultPaint; |
1653 SkASSERT(*paint == defaultPaint); | 1653 SkASSERT(*paint == defaultPaint); |
1654 } | 1654 } |
1655 #endif | 1655 #endif |
1656 | 1656 |
1657 paint->setAntiAlias(m_state->m_shouldAntialias); | 1657 paint->setAntiAlias(m_state->m_shouldAntialias); |
1658 paint->setXfermodeMode(m_state->m_xferMode); | 1658 paint->setXfermodeMode(m_state->m_xferMode); |
1659 paint->setLooper(m_state->m_looper); | 1659 paint->setLooper(m_state->m_looper.get()); |
1660 } | 1660 } |
1661 | 1661 |
1662 void GraphicsContext::drawOuterPath(const SkPath& path, SkPaint& paint, int widt
h) | 1662 void GraphicsContext::drawOuterPath(const SkPath& path, SkPaint& paint, int widt
h) |
1663 { | 1663 { |
1664 #if OS(DARWIN) | 1664 #if OS(DARWIN) |
1665 paint.setAlpha(64); | 1665 paint.setAlpha(64); |
1666 paint.setStrokeWidth(width); | 1666 paint.setStrokeWidth(width); |
1667 paint.setPathEffect(new SkCornerPathEffect((width - 1) * 0.5f))->unref(); | 1667 paint.setPathEffect(new SkCornerPathEffect((width - 1) * 0.5f))->unref(); |
1668 #else | 1668 #else |
1669 paint.setStrokeWidth(1); | 1669 paint.setStrokeWidth(1); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1827 | 1827 |
1828 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) | 1828 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) |
1829 { | 1829 { |
1830 if (m_trackTextRegion) { | 1830 if (m_trackTextRegion) { |
1831 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); | 1831 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); |
1832 m_textRegion.join(textRect); | 1832 m_textRegion.join(textRect); |
1833 } | 1833 } |
1834 } | 1834 } |
1835 | 1835 |
1836 } | 1836 } |
OLD | NEW |