Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1146)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/PaintGeneratedImage.h

Issue 1913283002: Trim Skia dependencies in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 PaintGeneratedImage_h 5 #ifndef PaintGeneratedImage_h
6 #define PaintGeneratedImage_h 6 #define PaintGeneratedImage_h
7 7
8 #include "platform/geometry/IntSize.h" 8 #include "platform/geometry/IntSize.h"
9 #include "platform/graphics/GeneratedImage.h" 9 #include "platform/graphics/GeneratedImage.h"
10 #include "wtf/OwnPtr.h" 10 #include "wtf/OwnPtr.h"
11 11
12 class SkPicture;
13
12 namespace blink { 14 namespace blink {
13 15
14 class PLATFORM_EXPORT PaintGeneratedImage : public GeneratedImage { 16 class PLATFORM_EXPORT PaintGeneratedImage : public GeneratedImage {
15 public: 17 public:
16 static PassRefPtr<PaintGeneratedImage> create(PassRefPtr<SkPicture> picture, const IntSize& size) 18 static PassRefPtr<PaintGeneratedImage> create(PassRefPtr<SkPicture> picture, const IntSize& size)
17 { 19 {
18 return adoptRef(new PaintGeneratedImage(picture, size)); 20 return adoptRef(new PaintGeneratedImage(picture, size));
19 } 21 }
20 ~PaintGeneratedImage() override { } 22 ~PaintGeneratedImage() override { }
21 23
22 protected: 24 protected:
23 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override; 25 void draw(SkCanvas*, const SkPaint&, const FloatRect&, const FloatRect&, Res pectImageOrientationEnum, ImageClampingMode) override;
24 void drawTile(GraphicsContext&, const FloatRect&) final; 26 void drawTile(GraphicsContext&, const FloatRect&) final;
25 27
26 PaintGeneratedImage(PassRefPtr<SkPicture> picture, const IntSize& size) 28 PaintGeneratedImage(PassRefPtr<SkPicture> picture, const IntSize& size)
27 : GeneratedImage(size) 29 : GeneratedImage(size)
28 , m_picture(picture) 30 , m_picture(picture)
29 { 31 {
30 } 32 }
31 33
32 RefPtr<SkPicture> m_picture; 34 RefPtr<SkPicture> m_picture;
33 }; 35 };
34 36
35 } // namespace blink 37 } // namespace blink
36 38
37 #endif // PaintGeneratedImage_h 39 #endif // PaintGeneratedImage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698