OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef PaintGeneratedImage_h | |
6 #define PaintGeneratedImage_h | |
7 | |
8 #include "platform/geometry/IntSize.h" | |
9 #include "platform/graphics/GeneratedImage.h" | |
10 #include "wtf/OwnPtr.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class PLATFORM_EXPORT PaintGeneratedImage : public GeneratedImage { | |
chrishtr
2016/04/06 18:55:20
Add comments explaining what this class is for.
ikilpatrick
2016/04/07 23:03:00
Done. PTAL
| |
15 public: | |
16 static PassRefPtr<PaintGeneratedImage> create(PassRefPtr<SkPicture> picture, const IntSize& size) | |
17 { | |
18 return adoptRef(new PaintGeneratedImage(picture, size)); | |
19 } | |
20 ~PaintGeneratedImage() override { } | |
21 | |
22 protected: | |
23 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override; | |
24 void drawTile(GraphicsContext&, const FloatRect&) final; | |
25 | |
26 PaintGeneratedImage(PassRefPtr<SkPicture> picture, const IntSize& size) | |
27 : GeneratedImage(size) | |
28 , m_picture(picture) | |
29 { | |
30 } | |
31 | |
32 RefPtr<SkPicture> m_picture; | |
33 }; | |
34 | |
35 } // namespace blink | |
36 | |
37 #endif // PaintGeneratedImage_h | |
OLD | NEW |