| 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 #ifndef CanvasRenderingContext2DState_h | 5 #ifndef CanvasRenderingContext2DState_h |
| 6 #define CanvasRenderingContext2DState_h | 6 #define CanvasRenderingContext2DState_h |
| 7 | 7 |
| 8 #include "core/css/CSSFontSelectorClient.h" | 8 #include "core/css/CSSFontSelectorClient.h" |
| 9 #include "modules/canvas2d/ClipList.h" | 9 #include "modules/canvas2d/ClipList.h" |
| 10 #include "platform/fonts/Font.h" | 10 #include "platform/fonts/Font.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void setUnparsedFont(const String& font) { m_unparsedFont = font; } | 85 void setUnparsedFont(const String& font) { m_unparsedFont = font; } |
| 86 const String& unparsedFont() const { return m_unparsedFont; } | 86 const String& unparsedFont() const { return m_unparsedFont; } |
| 87 | 87 |
| 88 void setFontForFilter(const Font& font) { m_fontForFilter = font; } | 88 void setFontForFilter(const Font& font) { m_fontForFilter = font; } |
| 89 | 89 |
| 90 void setFilter(const CSSValue*); | 90 void setFilter(const CSSValue*); |
| 91 void setUnparsedFilter(const String& filterString) { | 91 void setUnparsedFilter(const String& filterString) { |
| 92 m_unparsedFilter = filterString; | 92 m_unparsedFilter = filterString; |
| 93 } | 93 } |
| 94 const String& unparsedFilter() const { return m_unparsedFilter; } | 94 const String& unparsedFilter() const { return m_unparsedFilter; } |
| 95 SkImageFilter* getFilter(Element*, | 95 sk_sp<SkImageFilter> getFilter(Element*, |
| 96 IntSize canvasSize, | 96 IntSize canvasSize, |
| 97 CanvasRenderingContext2D*) const; | 97 CanvasRenderingContext2D*) const; |
| 98 bool hasFilter(Element*, IntSize canvasSize, CanvasRenderingContext2D*) const; | 98 bool hasFilter(Element*, IntSize canvasSize, CanvasRenderingContext2D*) const; |
| 99 void clearResolvedFilter() const; | 99 void clearResolvedFilter() const; |
| 100 | 100 |
| 101 void setStrokeStyle(CanvasStyle*); | 101 void setStrokeStyle(CanvasStyle*); |
| 102 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } | 102 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } |
| 103 | 103 |
| 104 void setFillStyle(CanvasStyle*); | 104 void setFillStyle(CanvasStyle*); |
| 105 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } | 105 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } |
| 106 | 106 |
| 107 CanvasStyle* style(PaintType) const; | 107 CanvasStyle* style(PaintType) const; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 void updateLineDash() const; | 188 void updateLineDash() const; |
| 189 void updateStrokeStyle() const; | 189 void updateStrokeStyle() const; |
| 190 void updateFillStyle() const; | 190 void updateFillStyle() const; |
| 191 void updateFilterQuality() const; | 191 void updateFilterQuality() const; |
| 192 void updateFilterQualityWithSkFilterQuality(const SkFilterQuality&) const; | 192 void updateFilterQualityWithSkFilterQuality(const SkFilterQuality&) const; |
| 193 void shadowParameterChanged(); | 193 void shadowParameterChanged(); |
| 194 SkDrawLooper* emptyDrawLooper() const; | 194 SkDrawLooper* emptyDrawLooper() const; |
| 195 SkDrawLooper* shadowOnlyDrawLooper() const; | 195 SkDrawLooper* shadowOnlyDrawLooper() const; |
| 196 SkDrawLooper* shadowAndForegroundDrawLooper() const; | 196 SkDrawLooper* shadowAndForegroundDrawLooper() const; |
| 197 SkImageFilter* shadowOnlyImageFilter() const; | 197 sk_sp<SkImageFilter> shadowOnlyImageFilter() const; |
| 198 SkImageFilter* shadowAndForegroundImageFilter() const; | 198 sk_sp<SkImageFilter> shadowAndForegroundImageFilter() const; |
| 199 | 199 |
| 200 unsigned m_unrealizedSaveCount; | 200 unsigned m_unrealizedSaveCount; |
| 201 | 201 |
| 202 String m_unparsedStrokeColor; | 202 String m_unparsedStrokeColor; |
| 203 String m_unparsedFillColor; | 203 String m_unparsedFillColor; |
| 204 Member<CanvasStyle> m_strokeStyle; | 204 Member<CanvasStyle> m_strokeStyle; |
| 205 Member<CanvasStyle> m_fillStyle; | 205 Member<CanvasStyle> m_fillStyle; |
| 206 | 206 |
| 207 mutable SkPaint m_strokePaint; | 207 mutable SkPaint m_strokePaint; |
| 208 mutable SkPaint m_fillPaint; | 208 mutable SkPaint m_fillPaint; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 bool m_imageSmoothingEnabled; | 246 bool m_imageSmoothingEnabled; |
| 247 SkFilterQuality m_imageSmoothingQuality; | 247 SkFilterQuality m_imageSmoothingQuality; |
| 248 | 248 |
| 249 ClipList m_clipList; | 249 ClipList m_clipList; |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 } // namespace blink | 252 } // namespace blink |
| 253 | 253 |
| 254 #endif | 254 #endif |
| OLD | NEW |