| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/canvas2d/BaseRenderingContext2D.h" | 5 #include "modules/canvas2d/BaseRenderingContext2D.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 9 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
| 10 #include "core/css/cssom/CSSURLImageValue.h" | 10 #include "core/css/cssom/CSSURLImageValue.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 if (!c) { | 732 if (!c) { |
| 733 return; | 733 return; |
| 734 } | 734 } |
| 735 if (!state().isTransformInvertible()) { | 735 if (!state().isTransformInvertible()) { |
| 736 return; | 736 return; |
| 737 } | 737 } |
| 738 | 738 |
| 739 SkPath skPath = path.getSkPath(); | 739 SkPath skPath = path.getSkPath(); |
| 740 skPath.setFillType(parseWinding(windingRuleString)); | 740 skPath.setFillType(parseWinding(windingRuleString)); |
| 741 modifiableState().clipPath(skPath, m_clipAntialiasing); | 741 modifiableState().clipPath(skPath, m_clipAntialiasing); |
| 742 c->clipPath(skPath, kIntersect_SkClipOp, m_clipAntialiasing == AntiAliased); | 742 c->clipPath(skPath, SkClipOp::kIntersect, m_clipAntialiasing == AntiAliased); |
| 743 if (ExpensiveCanvasHeuristicParameters::ComplexClipsAreExpensive && | 743 if (ExpensiveCanvasHeuristicParameters::ComplexClipsAreExpensive && |
| 744 !skPath.isRect(0) && hasImageBuffer()) { | 744 !skPath.isRect(0) && hasImageBuffer()) { |
| 745 imageBuffer()->setHasExpensiveOp(); | 745 imageBuffer()->setHasExpensiveOp(); |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 void BaseRenderingContext2D::clip(const String& windingRuleString) { | 749 void BaseRenderingContext2D::clip(const String& windingRuleString) { |
| 750 clipInternal(m_path, windingRuleString); | 750 clipInternal(m_path, windingRuleString); |
| 751 } | 751 } |
| 752 | 752 |
| (...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] * | 2016 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] * |
| 2017 m_usageCounters.numBlurredShadows + | 2017 m_usageCounters.numBlurredShadows + |
| 2018 ExpensiveCanvasHeuristicParameters:: | 2018 ExpensiveCanvasHeuristicParameters:: |
| 2019 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] * | 2019 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] * |
| 2020 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared; | 2020 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared; |
| 2021 | 2021 |
| 2022 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment; | 2022 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment; |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 } // namespace blink | 2025 } // namespace blink |
| OLD | NEW |