| 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" |
| 11 #include "platform/transforms/AffineTransform.h" | 11 #include "platform/transforms/AffineTransform.h" |
| 12 #include "wtf/Vector.h" | 12 #include "wtf/Vector.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 class CanvasRenderingContext2D; | 16 class BaseRenderingContext2D; |
| 17 class CanvasStyle; | 17 class CanvasStyle; |
| 18 class CSSValue; | 18 class CSSValue; |
| 19 class Element; | 19 class Element; |
| 20 | 20 |
| 21 class CanvasRenderingContext2DState final : public NoBaseWillBeGarbageCollectedF
inalized<CanvasRenderingContext2DState>, public CSSFontSelectorClient { | 21 class CanvasRenderingContext2DState final : public NoBaseWillBeGarbageCollectedF
inalized<CanvasRenderingContext2DState>, public CSSFontSelectorClient { |
| 22 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext2DState); | 22 WTF_MAKE_NONCOPYABLE(CanvasRenderingContext2DState); |
| 23 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CanvasRenderingContext2DState); | 23 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CanvasRenderingContext2DState); |
| 24 USING_FAST_MALLOC_WILL_BE_REMOVED(CanvasRenderingContext2DState); | 24 USING_FAST_MALLOC_WILL_BE_REMOVED(CanvasRenderingContext2DState); |
| 25 public: | 25 public: |
| 26 static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2DState> create() | 26 static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2DState> create() |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 void setFont(const Font&, CSSFontSelector*); | 80 void setFont(const Font&, CSSFontSelector*); |
| 81 const Font& font() const; | 81 const Font& font() const; |
| 82 bool hasRealizedFont() const { return m_realizedFont; } | 82 bool hasRealizedFont() const { return m_realizedFont; } |
| 83 void setUnparsedFont(const String& font) { m_unparsedFont = font; } | 83 void setUnparsedFont(const String& font) { m_unparsedFont = font; } |
| 84 const String& unparsedFont() const { return m_unparsedFont; } | 84 const String& unparsedFont() const { return m_unparsedFont; } |
| 85 | 85 |
| 86 void setFilter(PassRefPtrWillBeRawPtr<CSSValue>); | 86 void setFilter(PassRefPtrWillBeRawPtr<CSSValue>); |
| 87 void setUnparsedFilter(const String& filterString) { m_unparsedFilter = filt
erString; } | 87 void setUnparsedFilter(const String& filterString) { m_unparsedFilter = filt
erString; } |
| 88 const String& unparsedFilter() const { return m_unparsedFilter; } | 88 const String& unparsedFilter() const { return m_unparsedFilter; } |
| 89 SkImageFilter* getFilter(Element*, const Font&, IntSize canvasSize, CanvasRe
nderingContext2D*) const; | 89 SkImageFilter* getFilter(Element*, const Font*, IntSize canvasSize, BaseRend
eringContext2D*) const; |
| 90 bool hasFilter(Element*, const Font&, IntSize canvasSize, CanvasRenderingCon
text2D*) const; | 90 bool hasFilter(Element*, const Font*, IntSize canvasSize, BaseRenderingConte
xt2D*) const; |
| 91 void clearResolvedFilter() const; | 91 void clearResolvedFilter() const; |
| 92 | 92 |
| 93 void setStrokeStyle(CanvasStyle*); | 93 void setStrokeStyle(CanvasStyle*); |
| 94 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } | 94 CanvasStyle* strokeStyle() const { return m_strokeStyle.get(); } |
| 95 | 95 |
| 96 void setFillStyle(CanvasStyle*); | 96 void setFillStyle(CanvasStyle*); |
| 97 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } | 97 CanvasStyle* fillStyle() const { return m_fillStyle.get(); } |
| 98 | 98 |
| 99 CanvasStyle* style(PaintType) const; | 99 CanvasStyle* style(PaintType) const; |
| 100 | 100 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 bool m_imageSmoothingEnabled; | 227 bool m_imageSmoothingEnabled; |
| 228 SkFilterQuality m_imageSmoothingQuality; | 228 SkFilterQuality m_imageSmoothingQuality; |
| 229 | 229 |
| 230 ClipList m_clipList; | 230 ClipList m_clipList; |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 } // namespace blink | 233 } // namespace blink |
| 234 | 234 |
| 235 #endif | 235 #endif |
| OLD | NEW |