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

Unified Diff: src/core/SkDevice.cpp

Issue 577023002: hide deviceproperties, prepare the way for surfaceprops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkTrackDevice.h Created 6 years, 3 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
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkDeviceProperties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index d22b22752d23852e676fd18b4c8e0f445ba40fb3..9b37da1fbd21d4dee812a1c43182b05c2a4b557c 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -6,23 +6,14 @@
*/
#include "SkDevice.h"
+#include "SkDeviceProperties.h"
#include "SkDraw.h"
#include "SkMetaData.h"
#include "SkPatchUtils.h"
#include "SkTextBlob.h"
SkBaseDevice::SkBaseDevice()
- : fLeakyProperties(SkDeviceProperties::MakeDefault())
-#ifdef SK_DEBUG
- , fAttachedToCanvas(false)
-#endif
-{
- fOrigin.setZero();
- fMetaData = NULL;
-}
-
-SkBaseDevice::SkBaseDevice(const SkDeviceProperties& deviceProperties)
- : fLeakyProperties(deviceProperties)
+ : fLeakyProperties(SkNEW_ARGS(SkDeviceProperties, (SkDeviceProperties::MakeDefault())))
#ifdef SK_DEBUG
, fAttachedToCanvas(false)
#endif
@@ -32,7 +23,8 @@ SkBaseDevice::SkBaseDevice(const SkDeviceProperties& deviceProperties)
}
SkBaseDevice::~SkBaseDevice() {
- delete fMetaData;
+ SkDELETE(fLeakyProperties);
+ SkDELETE(fMetaData);
}
SkBaseDevice* SkBaseDevice::createCompatibleDevice(const SkImageInfo& info) {
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkDeviceProperties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698