| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 PicturePattern_h | 5 #ifndef PicturePattern_h |
| 6 #define PicturePattern_h | 6 #define PicturePattern_h |
| 7 | 7 |
| 8 #include "platform/graphics/Pattern.h" | 8 #include "platform/graphics/Pattern.h" |
| 9 #include "third_party/skia/include/core/SkRefCnt.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 class PLATFORM_EXPORT PicturePattern final : public Pattern { | 13 class PLATFORM_EXPORT PicturePattern final : public Pattern { |
| 13 public: | 14 public: |
| 14 static PassRefPtr<PicturePattern> create(PassRefPtr<SkPicture>, RepeatMode); | 15 static PassRefPtr<PicturePattern> create(sk_sp<SkPicture>, RepeatMode); |
| 15 | 16 |
| 16 ~PicturePattern() override; | 17 ~PicturePattern() override; |
| 17 | 18 |
| 18 protected: | 19 protected: |
| 19 sk_sp<SkShader> createShader(const SkMatrix&) override; | 20 sk_sp<SkShader> createShader(const SkMatrix&) override; |
| 20 | 21 |
| 21 private: | 22 private: |
| 22 PicturePattern(PassRefPtr<SkPicture>, RepeatMode); | 23 PicturePattern(sk_sp<SkPicture>, RepeatMode); |
| 23 | 24 |
| 24 sk_sp<SkPicture> m_tilePicture; | 25 sk_sp<SkPicture> m_tilePicture; |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 } // namespace blink | 28 } // namespace blink |
| 28 | 29 |
| 29 #endif | 30 #endif |
| OLD | NEW |