| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "modules/canvas2d/CanvasRenderingContext2DState.h" | 7 #include "modules/canvas2d/CanvasRenderingContext2DState.h" |
| 8 | 8 |
| 9 #include "core/css/CSSFontSelector.h" | 9 #include "core/css/CSSFontSelector.h" |
| 10 #include "core/css/resolver/FilterOperationResolver.h" | 10 #include "core/css/resolver/FilterOperationResolver.h" |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 m_shadowBlur = shadowBlur; | 427 m_shadowBlur = shadowBlur; |
| 428 shadowParameterChanged(); | 428 shadowParameterChanged(); |
| 429 } | 429 } |
| 430 | 430 |
| 431 void CanvasRenderingContext2DState::setShadowColor(SkColor shadowColor) | 431 void CanvasRenderingContext2DState::setShadowColor(SkColor shadowColor) |
| 432 { | 432 { |
| 433 m_shadowColor = shadowColor; | 433 m_shadowColor = shadowColor; |
| 434 shadowParameterChanged(); | 434 shadowParameterChanged(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 void CanvasRenderingContext2DState::setFilter(CSSValue filterValue) | 437 void CanvasRenderingContext2DState::setFilter(const CSSValue& filterValue) |
| 438 { | 438 { |
| 439 m_filterValue = filterValue; | 439 m_filterValue = filterValue; |
| 440 m_resolvedFilter.clear(); | 440 m_resolvedFilter.clear(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void CanvasRenderingContext2DState::setGlobalComposite(SkXfermode::Mode mode) | 443 void CanvasRenderingContext2DState::setGlobalComposite(SkXfermode::Mode mode) |
| 444 { | 444 { |
| 445 m_strokePaint.setXfermodeMode(mode); | 445 m_strokePaint.setXfermodeMode(mode); |
| 446 m_fillPaint.setXfermodeMode(mode); | 446 m_fillPaint.setXfermodeMode(mode); |
| 447 m_imagePaint.setXfermodeMode(mode); | 447 m_imagePaint.setXfermodeMode(mode); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 paint->setLooper(0); | 523 paint->setLooper(0); |
| 524 paint->setImageFilter(shadowAndForegroundImageFilter()); | 524 paint->setImageFilter(shadowAndForegroundImageFilter()); |
| 525 return paint; | 525 return paint; |
| 526 } | 526 } |
| 527 paint->setLooper(shadowAndForegroundDrawLooper()); | 527 paint->setLooper(shadowAndForegroundDrawLooper()); |
| 528 paint->setImageFilter(0); | 528 paint->setImageFilter(0); |
| 529 return paint; | 529 return paint; |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // blink | 532 } // blink |
| OLD | NEW |