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

Unified Diff: src/svg/SkSVGDevice.cpp

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 side-by-side diff with in-line comments
Download patch
« include/core/SkDevice.h ('K') | « src/svg/SkSVGDevice.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/SkSVGDevice.cpp
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
index 4330901b7e859c489104f19b072a59503009df22..3ba721ee3902ae4621ee77329f7b91d6111aacf7 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -570,10 +570,11 @@ SkBaseDevice* SkSVGDevice::Create(const SkISize& size, SkXMLWriter* writer) {
}
SkSVGDevice::SkSVGDevice(const SkISize& size, SkXMLWriter* writer)
- : INHERITED(SkSurfaceProps(0, kUnknown_SkPixelGeometry))
+ : INHERITED(SkImageInfo::MakeUnknown(size.fWidth, size.fHeight),
+ SkSurfaceProps(0, kUnknown_SkPixelGeometry))
, fWriter(writer)
, fResourceBucket(new ResourceBucket)
- , fSize(size) {
+{
SkASSERT(writer);
fWriter->writeHeader();
@@ -590,11 +591,6 @@ SkSVGDevice::SkSVGDevice(const SkISize& size, SkXMLWriter* writer)
SkSVGDevice::~SkSVGDevice() {
}
-SkImageInfo SkSVGDevice::imageInfo() const {
- SkImageInfo info = SkImageInfo::MakeUnknown(fSize.fWidth, fSize.fHeight);
- return info;
-}
-
void SkSVGDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) {
AutoElement rect("rect", fWriter, fResourceBucket, draw, paint);
rect.addRectAttributes(SkRect::MakeWH(SkIntToScalar(this->width()),
« include/core/SkDevice.h ('K') | « src/svg/SkSVGDevice.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698