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 #include "third_party/skia/include/core/SkRefCnt.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class PLATFORM_EXPORT PicturePattern final : public Pattern { | 13 class PLATFORM_EXPORT PicturePattern final : public Pattern { |
14 public: | 14 public: |
15 static PassRefPtr<PicturePattern> create(sk_sp<SkPicture>, RepeatMode); | 15 static PassRefPtr<PicturePattern> create(sk_sp<PaintRecord>, RepeatMode); |
16 | 16 |
17 ~PicturePattern() override; | 17 ~PicturePattern() override; |
18 | 18 |
19 protected: | 19 protected: |
20 sk_sp<SkShader> createShader(const SkMatrix&) override; | 20 sk_sp<PaintShader> createShader(const SkMatrix&) override; |
21 | 21 |
22 private: | 22 private: |
23 PicturePattern(sk_sp<SkPicture>, RepeatMode); | 23 PicturePattern(sk_sp<PaintRecord>, RepeatMode); |
24 | 24 |
25 sk_sp<SkPicture> m_tilePicture; | 25 sk_sp<PaintRecord> m_tilePicture; |
26 }; | 26 }; |
27 | 27 |
28 } // namespace blink | 28 } // namespace blink |
29 | 29 |
30 #endif | 30 #endif |
OLD | NEW |