summaryrefslogtreecommitdiffstats
path: root/libs/hwui/utils
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-01-05 15:51:13 -0800
committerChris Craik <ccraik@google.com>2015-01-05 16:49:13 -0800
commitd41c4d8c732095ae99c955b6b82f7306633004b1 (patch)
treedbb2e26c6c5a80c7ccf43e5cd5fb1554cc603555 /libs/hwui/utils
parent8dfaa4904205772cdceee63ef3989bcdedf1a914 (diff)
downloadframeworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.zip
frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.gz
frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.bz2
Add overrides and switch to nullptr keyword for all files
Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
Diffstat (limited to 'libs/hwui/utils')
-rw-r--r--libs/hwui/utils/PaintUtils.h4
-rw-r--r--libs/hwui/utils/Timing.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/hwui/utils/PaintUtils.h b/libs/hwui/utils/PaintUtils.h
index 8a4034f..fa0ae03 100644
--- a/libs/hwui/utils/PaintUtils.h
+++ b/libs/hwui/utils/PaintUtils.h
@@ -44,13 +44,13 @@ public:
// TODO: move to a method on android:Paint? replace with SkPaint::nothingToDraw()?
static inline bool paintWillNotDrawText(const SkPaint& paint) {
return paint.getAlpha() == 0
- && paint.getLooper() == NULL
+ && paint.getLooper() == nullptr
&& !paint.getColorFilter()
&& getXfermode(paint.getXfermode()) == SkXfermode::kSrcOver_Mode;
}
static bool isBlendedColorFilter(const SkColorFilter* filter) {
- if (filter == NULL) {
+ if (filter == nullptr) {
return false;
}
return (filter->getFlags() & SkColorFilter::kAlphaUnchanged_Flag) == 0;
diff --git a/libs/hwui/utils/Timing.h b/libs/hwui/utils/Timing.h
index eced987..dd8847a 100644
--- a/libs/hwui/utils/Timing.h
+++ b/libs/hwui/utils/Timing.h
@@ -24,12 +24,12 @@ class MethodTimer {
public:
MethodTimer(const char* name)
: mMethodName(name) {
- gettimeofday(&mStart, NULL);
+ gettimeofday(&mStart, nullptr);
}
~MethodTimer() {
struct timeval stop;
- gettimeofday(&stop, NULL);
+ gettimeofday(&stop, nullptr);
long long elapsed = (stop.tv_sec * 1000000) - (mStart.tv_sec * 1000000)
+ (stop.tv_usec - mStart.tv_usec);
ALOGD("%s took %.2fms", mMethodName, elapsed / 1000.0);