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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months 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/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/css/cssom/CSSURLImageValue.h" 10 #include "core/css/cssom/CSSURLImageValue.h"
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 CanvasGradient* BaseRenderingContext2D::createRadialGradient( 1375 CanvasGradient* BaseRenderingContext2D::createRadialGradient(
1376 double x0, 1376 double x0,
1377 double y0, 1377 double y0,
1378 double r0, 1378 double r0,
1379 double x1, 1379 double x1,
1380 double y1, 1380 double y1,
1381 double r1, 1381 double r1,
1382 ExceptionState& exceptionState) { 1382 ExceptionState& exceptionState) {
1383 if (r0 < 0 || r1 < 0) { 1383 if (r0 < 0 || r1 < 0) {
1384 exceptionState.throwDOMException( 1384 exceptionState.throwDOMException(
1385 IndexSizeError, String::format("The %s provided is less than 0.", 1385 IndexSizeError,
1386 r0 < 0 ? "r0" : "r1")); 1386 String::format("The %s provided is less than 0.",
1387 r0 < 0 ? "r0" : "r1"));
1387 return nullptr; 1388 return nullptr;
1388 } 1389 }
1389 1390
1390 CanvasGradient* gradient = 1391 CanvasGradient* gradient =
1391 CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1); 1392 CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
1392 return gradient; 1393 return gradient;
1393 } 1394 }
1394 1395
1395 CanvasPattern* BaseRenderingContext2D::createPattern( 1396 CanvasPattern* BaseRenderingContext2D::createPattern(
1396 ScriptState* scriptState, 1397 ScriptState* scriptState,
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] * 2023 ExpensiveCanvasHeuristicParameters::ShadowFixedCost[index] *
2023 m_usageCounters.numBlurredShadows + 2024 m_usageCounters.numBlurredShadows +
2024 ExpensiveCanvasHeuristicParameters:: 2025 ExpensiveCanvasHeuristicParameters::
2025 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] * 2026 ShadowVariableCostPerAreaTimesShadowBlurSquared[index] *
2026 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared; 2027 m_usageCounters.boundingBoxAreaTimesShadowBlurSquared;
2027 2028
2028 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment; 2029 return basicCostOfDrawCalls + fillTypeAdjustment + shadowAdjustment;
2029 } 2030 }
2030 2031
2031 } // namespace blink 2032 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698