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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 sk_sp<SkImageFilter> getFilter(Element*, | 95 sk_sp<SkImageFilter> getFilter(Element*, |
96 IntSize canvasSize, | 96 IntSize canvasSize, |
97 CanvasRenderingContext2D*) const; | 97 CanvasRenderingContext2D*) const; |
| 98 sk_sp<SkImageFilter> getFilterForOffscreenCanvas(IntSize canvasSize) const; |
| 99 bool hasFilterForOffscreenCanvas(IntSize canvasSize) const; |
98 bool hasFilter(Element*, IntSize canvasSize, CanvasRenderingContext2D*) const; | 100 bool hasFilter(Element*, IntSize canvasSize, CanvasRenderingContext2D*) const; |
99 void clearResolvedFilter() const; | 101 void clearResolvedFilter() const; |
100 | 102 |
101 void setStrokeStyle(CanvasStyle*); | 103 void setStrokeStyle(CanvasStyle*); |
102 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } | 104 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } |
103 | 105 |
104 void setFillStyle(CanvasStyle*); | 106 void setFillStyle(CanvasStyle*); |
105 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } | 107 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } |
106 | 108 |
107 CanvasStyle* style(PaintType) const; | 109 CanvasStyle* style(PaintType) const; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 247 |
246 bool m_imageSmoothingEnabled; | 248 bool m_imageSmoothingEnabled; |
247 SkFilterQuality m_imageSmoothingQuality; | 249 SkFilterQuality m_imageSmoothingQuality; |
248 | 250 |
249 ClipList m_clipList; | 251 ClipList m_clipList; |
250 }; | 252 }; |
251 | 253 |
252 } // namespace blink | 254 } // namespace blink |
253 | 255 |
254 #endif | 256 #endif |
OLD | NEW |