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

Side by Side Diff: src/svg/SkSVGDevice.h

Issue 2261003003: store info in basedevice, change getter to non-virtual const& (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSVGDevice_DEFINED 8 #ifndef SkSVGDevice_DEFINED
9 #define SkSVGDevice_DEFINED 9 #define SkSVGDevice_DEFINED
10 10
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkTemplates.h" 12 #include "SkTemplates.h"
13 13
14 class SkXMLWriter; 14 class SkXMLWriter;
15 15
16 class SkSVGDevice : public SkBaseDevice { 16 class SkSVGDevice : public SkBaseDevice {
17 public: 17 public:
18 static SkBaseDevice* Create(const SkISize& size, SkXMLWriter* writer); 18 static SkBaseDevice* Create(const SkISize& size, SkXMLWriter* writer);
19 19
20 SkImageInfo imageInfo() const override;
21
22 protected: 20 protected:
23 void drawPaint(const SkDraw&, const SkPaint& paint) override; 21 void drawPaint(const SkDraw&, const SkPaint& paint) override;
24 void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, 22 void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count,
25 const SkPoint[], const SkPaint& paint) override; 23 const SkPoint[], const SkPaint& paint) override;
26 void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override ; 24 void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override ;
27 void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) overr ide; 25 void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) overr ide;
28 void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) overr ide; 26 void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) overr ide;
29 void drawPath(const SkDraw&, const SkPath& path, 27 void drawPath(const SkDraw&, const SkPath& path,
30 const SkPaint& paint, 28 const SkPaint& paint,
31 const SkMatrix* prePathMatrix = nullptr, 29 const SkMatrix* prePathMatrix = nullptr,
(...skipping 29 matching lines...) Expand all
61 virtual ~SkSVGDevice(); 59 virtual ~SkSVGDevice();
62 60
63 void drawBitmapCommon(const SkDraw& draw, const SkBitmap& bm, const SkPaint& paint); 61 void drawBitmapCommon(const SkDraw& draw, const SkBitmap& bm, const SkPaint& paint);
64 62
65 class AutoElement; 63 class AutoElement;
66 class ResourceBucket; 64 class ResourceBucket;
67 65
68 SkXMLWriter* fWriter; 66 SkXMLWriter* fWriter;
69 SkAutoTDelete<AutoElement> fRootElement; 67 SkAutoTDelete<AutoElement> fRootElement;
70 SkAutoTDelete<ResourceBucket> fResourceBucket; 68 SkAutoTDelete<ResourceBucket> fResourceBucket;
71 SkISize fSize;
72 69
73 typedef SkBaseDevice INHERITED; 70 typedef SkBaseDevice INHERITED;
74 }; 71 };
75 72
76 #endif // SkSVGDevice_DEFINED 73 #endif // SkSVGDevice_DEFINED
OLDNEW
« include/core/SkDevice.h ('K') | « src/pdf/SkPDFDevice.cpp ('k') | src/svg/SkSVGDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698