Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 2472543002: remove legacy Skia flags (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 // for SkMatrix to find the transform to be non-invertible at this stage. 1026 // for SkMatrix to find the transform to be non-invertible at this stage.
1027 // crbug.com/504687 1027 // crbug.com/504687
1028 return; 1028 return;
1029 } 1029 }
1030 c->save(); 1030 c->save();
1031 c->concat(invCtm); 1031 c->concat(invCtm);
1032 SkRect bounds = dstRect; 1032 SkRect bounds = dstRect;
1033 ctm.mapRect(&bounds); 1033 ctm.mapRect(&bounds);
1034 SkPaint layerPaint; 1034 SkPaint layerPaint;
1035 layerPaint.setBlendMode(paint->getBlendMode()); 1035 layerPaint.setBlendMode(paint->getBlendMode());
1036 layerPaint.setImageFilter(paint->getImageFilter()); 1036 layerPaint.setImageFilter(sk_ref_sp(paint->getImageFilter()));
1037 1037
1038 c->saveLayer(&bounds, &layerPaint); 1038 c->saveLayer(&bounds, &layerPaint);
1039 c->concat(ctm); 1039 c->concat(ctm);
1040 imagePaint.setBlendMode(SkBlendMode::kSrcOver); 1040 imagePaint.setBlendMode(SkBlendMode::kSrcOver);
1041 imagePaint.setImageFilter(nullptr); 1041 imagePaint.setImageFilter(nullptr);
1042 } 1042 }
1043 1043
1044 if (!imageSmoothingEnabled() && 1044 if (!imageSmoothingEnabled() &&
1045 isDrawScalingDown(srcRect, dstRect, state().transform().xScaleSquared(), 1045 isDrawScalingDown(srcRect, dstRect, state().transform().xScaleSquared(),
1046 state().transform().yScaleSquared())) 1046 state().transform().yScaleSquared()))
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] * 1983 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] *
1984 m_usageCounters.numBlurredShadows + 1984 m_usageCounters.numBlurredShadows +
1985 ExpensiveCanvasHeuristicParameters:: 1985 ExpensiveCanvasHeuristicParameters::
1986 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] * 1986 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] *
1987 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared; 1987 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared;
1988 1988
1989 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment; 1989 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment;
1990 } 1990 }
1991 1991
1992 } // namespace blink 1992 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698