aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r--src/core/SkPicture.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 343ca2b4b2..c199caebd6 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -2,16 +2,16 @@
**
** Copyright 2007, The Android Open Source Project
**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
**
-** http://www.apache.org/licenses/LICENSE-2.0
+** http://www.apache.org/licenses/LICENSE-2.0
**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
** limitations under the License.
*/
@@ -37,7 +37,7 @@
#ifdef SK_DEBUG
-// enable SK_DEBUG_TRACE to trace DrawType elements when
+// enable SK_DEBUG_TRACE to trace DrawType elements when
// recorded and played back
// #define SK_DEBUG_TRACE
// enable SK_DEBUG_SIZE to see the size of picture components
@@ -77,12 +77,12 @@ const char* DrawTypeToString(DrawType drawType) {
case SCALE: return "SCALE";
case SKEW: return "SKEW";
case TRANSLATE: return "TRANSLATE";
- default:
- SkDebugf("DrawType error 0x%08x\n", drawType);
- SkASSERT(0);
+ default:
+ SkDebugf("DrawType error 0x%08x\n", drawType);
+ SkASSERT(0);
break;
}
- SkASSERT(0);
+ SkASSERT(0);
return NULL;
}
#endif
@@ -133,7 +133,7 @@ SkPicture::SkPicture(const SkPicture& src) : SkRefCnt() {
}
SkPicture::~SkPicture() {
- fRecord->safeUnref();
+ SkSafeUnref(fRecord);
SkDELETE(fPlayback);
}
@@ -166,7 +166,7 @@ SkCanvas* SkPicture::beginRecording(int width, int height,
SkBitmap bm;
bm.setConfig(SkBitmap::kNo_Config, width, height);
fRecord->setBitmapDevice(bm);
-
+
return fRecord;
}
@@ -217,7 +217,7 @@ SkPicture::SkPicture(SkStream* stream) : SkRefCnt() {
void SkPicture::serialize(SkWStream* stream) const {
SkPicturePlayback* playback = fPlayback;
-
+
if (NULL == playback && fRecord) {
playback = SkNEW_ARGS(SkPicturePlayback, (*fRecord));
}