diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-19 07:15:10 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-19 07:15:10 +0000 |
commit | 8eaddb0089a170760e157646192813bd940c26e7 (patch) | |
tree | f2ac6db843426d503b3251a9d313901dd2a5b752 /src | |
parent | f381162e5616daacdbcc06d693aca5111aeeebe8 (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8211 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkData.cpp | 1 | ||||
-rw-r--r-- | src/core/SkStream.cpp | 13 | ||||
-rw-r--r-- | src/effects/SkBlurMaskFilter.cpp | 8 | ||||
-rw-r--r-- | src/effects/SkEmbossMaskFilter.cpp | 2 |
4 files changed, 11 insertions, 13 deletions
diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp index 8fbca7af5f..8c222002ca 100644 --- a/src/core/SkData.cpp +++ b/src/core/SkData.cpp @@ -321,4 +321,3 @@ SkDataSet* SkDataSet::NewEmpty() { gEmptySet->ref(); return gEmptySet; } - diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index bd5dd32e37..ed1287e8d7 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -802,24 +802,24 @@ static bool mmap_filename(const char path[], void** addrPtr, size_t* sizePtr) { if (fd < 0) { return false; } - + off_t offset = lseek(fd, 0, SEEK_END); // find the file size if (offset == -1) { close(fd); return false; } (void)lseek(fd, 0, SEEK_SET); // restore file offset to beginning - + // to avoid a 64bit->32bit warning, I explicitly create a size_t size size_t size = static_cast<size_t>(offset); - + void* addr = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); close(fd); - + if (MAP_FAILED == addr) { return false; } - + *addrPtr = addr; *sizePtr = size; return true; @@ -837,7 +837,7 @@ SkStream* SkStream::NewFromFile(const char path[]) { return SkNEW_ARGS(SkMemoryStream, (data.get())); } } - + // If we get here, then our attempt at using mmap failed, so try normal // file access. SkFILEStream* stream = SkNEW_ARGS(SkFILEStream, (path)); @@ -847,4 +847,3 @@ SkStream* SkStream::NewFromFile(const char path[]) { } return stream; } - diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index 2329b0f685..3d0fb81e48 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -357,11 +357,11 @@ void SkBlurMaskFilterImpl::toString(SkString* str) const { str->append("flags: ("); if (fBlurFlags) { bool needSeparator = false; - SkAddFlagToString(str, - SkToBool(fBlurFlags & SkBlurMaskFilter::kIgnoreTransform_BlurFlag), + SkAddFlagToString(str, + SkToBool(fBlurFlags & SkBlurMaskFilter::kIgnoreTransform_BlurFlag), "IgnoreXform", &needSeparator); - SkAddFlagToString(str, - SkToBool(fBlurFlags & SkBlurMaskFilter::kHighQuality_BlurFlag), + SkAddFlagToString(str, + SkToBool(fBlurFlags & SkBlurMaskFilter::kHighQuality_BlurFlag), "HighQuality", &needSeparator); } else { str->append("None"); diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index a205fccf15..391cba55c4 100644 --- a/src/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp @@ -145,7 +145,7 @@ void SkEmbossMaskFilter::toString(SkString* str) const { str->appendScalar(fLight.fDirection[2]); str->append(") "); - str->appendf("ambient: %d specular: %d ", + str->appendf("ambient: %d specular: %d ", fLight.fAmbient, fLight.fSpecular); str->append("blurRadius: "); |