| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class ExceptionState; | 36 class ExceptionState; |
| 37 class Image; | 37 class Image; |
| 38 | 38 |
| 39 class CanvasPattern final : public GarbageCollectedFinalized<CanvasPattern>, pub
lic ScriptWrappable { | 39 class CanvasPattern final : public GarbageCollectedFinalized<CanvasPattern>, pub
lic ScriptWrappable { |
| 40 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 41 public: | 41 public: |
| 42 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState
&); | 42 static Pattern::RepeatMode parseRepetitionType(const String&, ExceptionState
&); |
| 43 | 43 |
| 44 static CanvasPattern* create(PassRefPtr<Image> image, Pattern::RepeatMode re
peat, bool originClean) | 44 static CanvasPattern* create(PassRefPtr<Image> image, Pattern::RepeatMode re
peat, bool originClean) |
| 45 { | 45 { |
| 46 return new CanvasPattern(image, repeat, originClean); | 46 return new CanvasPattern(std::move(image), repeat, originClean); |
| 47 } | 47 } |
| 48 | 48 |
| 49 Pattern* getPattern() const { return m_pattern.get(); } | 49 Pattern* getPattern() const { return m_pattern.get(); } |
| 50 const AffineTransform& getTransform() const { return m_patternTransform; } | 50 const AffineTransform& getTransform() const { return m_patternTransform; } |
| 51 | 51 |
| 52 bool originClean() const { return m_originClean; } | 52 bool originClean() const { return m_originClean; } |
| 53 | 53 |
| 54 DEFINE_INLINE_TRACE() { } | 54 DEFINE_INLINE_TRACE() { } |
| 55 | 55 |
| 56 void setTransform(SVGMatrixTearOff*); | 56 void setTransform(SVGMatrixTearOff*); |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean); | 59 CanvasPattern(PassRefPtr<Image>, Pattern::RepeatMode, bool originClean); |
| 60 | 60 |
| 61 RefPtr<Pattern> m_pattern; | 61 RefPtr<Pattern> m_pattern; |
| 62 AffineTransform m_patternTransform; | 62 AffineTransform m_patternTransform; |
| 63 bool m_originClean; | 63 bool m_originClean; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 | 67 |
| 68 #endif // CanvasPattern_h | 68 #endif // CanvasPattern_h |
| OLD | NEW |