| 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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 void GraphicsContext::clipOutRoundedRect(const RoundedRect& rect) | 1556 void GraphicsContext::clipOutRoundedRect(const RoundedRect& rect) |
| 1557 { | 1557 { |
| 1558 if (contextDisabled()) | 1558 if (contextDisabled()) |
| 1559 return; | 1559 return; |
| 1560 | 1560 |
| 1561 clipRoundedRect(rect, SkRegion::kDifference_Op); | 1561 clipRoundedRect(rect, SkRegion::kDifference_Op); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 void GraphicsContext::canvasClip(const Path& pathToClip, WindRule clipRule) | 1564 void GraphicsContext::canvasClip(const Path& pathToClip, WindRule clipRule, Anti
AliasingMode aa) |
| 1565 { | 1565 { |
| 1566 if (contextDisabled()) | 1566 if (contextDisabled()) |
| 1567 return; | 1567 return; |
| 1568 | 1568 |
| 1569 // Use const_cast and temporarily modify the fill type instead of copying th
e path. | 1569 // Use const_cast and temporarily modify the fill type instead of copying th
e path. |
| 1570 SkPath& path = const_cast<SkPath&>(pathToClip.skPath()); | 1570 SkPath& path = const_cast<SkPath&>(pathToClip.skPath()); |
| 1571 SkPath::FillType previousFillType = path.getFillType(); | 1571 SkPath::FillType previousFillType = path.getFillType(); |
| 1572 | 1572 |
| 1573 SkPath::FillType temporaryFillType = WebCoreWindRuleToSkFillType(clipRule); | 1573 SkPath::FillType temporaryFillType = WebCoreWindRuleToSkFillType(clipRule); |
| 1574 path.setFillType(temporaryFillType); | 1574 path.setFillType(temporaryFillType); |
| 1575 clipPath(path); | 1575 clipPath(path, aa); |
| 1576 | 1576 |
| 1577 path.setFillType(previousFillType); | 1577 path.setFillType(previousFillType); |
| 1578 } | 1578 } |
| 1579 | 1579 |
| 1580 void GraphicsContext::clipRect(const SkRect& rect, AntiAliasingMode aa, SkRegion
::Op op) | 1580 void GraphicsContext::clipRect(const SkRect& rect, AntiAliasingMode aa, SkRegion
::Op op) |
| 1581 { | 1581 { |
| 1582 ASSERT(m_canvas); | 1582 ASSERT(m_canvas); |
| 1583 if (contextDisabled()) | 1583 if (contextDisabled()) |
| 1584 return; | 1584 return; |
| 1585 | 1585 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag | 2013 // FIXME: This is to not break tests (it results in the filter bitmap fl
ag |
| 2014 // being set to true). We need to decide if we respect InterpolationNone | 2014 // being set to true). We need to decide if we respect InterpolationNone |
| 2015 // being returned from computeInterpolationQuality. | 2015 // being returned from computeInterpolationQuality. |
| 2016 resampling = InterpolationLow; | 2016 resampling = InterpolationLow; |
| 2017 } | 2017 } |
| 2018 resampling = limitInterpolationQuality(this, resampling); | 2018 resampling = limitInterpolationQuality(this, resampling); |
| 2019 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); | 2019 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 } // namespace blink | 2022 } // namespace blink |
| OLD | NEW |