aboutsummaryrefslogtreecommitdiffstats
path: root/src/animator/SkDrawPaint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animator/SkDrawPaint.cpp')
-rw-r--r--src/animator/SkDrawPaint.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp
index f21a15a..4d1bd8b 100644
--- a/src/animator/SkDrawPaint.cpp
+++ b/src/animator/SkDrawPaint.cpp
@@ -1,19 +1,11 @@
-/* libs/graphics/animator/SkDrawPaint.cpp
-**
-** Copyright 2006, 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
-**
-** 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
-** limitations under the License.
-*/
+
+/*
+ * Copyright 2006 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "SkDrawPaint.h"
#include "SkAnimateMaker.h"
@@ -98,11 +90,11 @@ SkDrawPaint::~SkDrawPaint() {
delete typeface;
}
-bool SkDrawPaint::add(SkAnimateMaker& maker, SkDisplayable* child) {
+bool SkDrawPaint::add(SkAnimateMaker* maker, SkDisplayable* child) {
SkASSERT(child && child->isPaintPart());
SkPaintPart* part = (SkPaintPart*) child;
- if (part->add())
- maker.setErrorCode(SkDisplayXMLParserError::kErrorAddingToPaint);
+ if (part->add() && maker)
+ maker->setErrorCode(SkDisplayXMLParserError::kErrorAddingToPaint);
return true;
}