aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDevice.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-09-17 10:49:38 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-17 10:49:38 -0700
commite010f1c2a0e6fe9cbaa73be01c7d878308b5166c (patch)
treefc58371e12766f8c6b1ff96f812a10476b26d5c5 /src/core/SkDevice.cpp
parent4e205b10799730b887ae5d6ac7207570292c177f (diff)
hide deviceproperties, prepare the way for surfaceprops
BUG=skia: NOTRY=True R=bungeman@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/577023002
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r--src/core/SkDevice.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index d22b22752d..9b37da1fbd 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) {